def step_infer(resources, graph, argspec):
    """Infer types, shapes, values, etc. for the graph.

    Inputs:
        graph: The graph to infer.
        argspec: Information about argument types.

    Outputs:
        outspec: Inference results for the graph's output.
        inference_context: The Context for the root graph.
    """
    res, context = resources.inferrer.infer(graph, argspec)
    return {'outspec': res,
            'argspec': argspec,
            'inference_context': context}