class_docstr: CoreML internal representation of a torch IR graph. A torch._C.Graph
  object is not an ideal structure to use in converting to CoreML. Conversion
  to an InternalTorchIRGraph is inserted between the original graph and the
  final CoreML model to address several issues:
      1. A torch._C.graph is hard to work with. For example, its .inputs()
        and .outputs() functions return iterators, so the only way to
        determine the number of inputs/outputs is by counting to the end.
        There are other examples of why the torch structure is hard to work
        with, and this structure alleviates those isses.
      2. torch._C.graph is an internal API and so we can't count on its
        stability. By inserting a layer in between, we can handle any changes
        to torch._C.graph here and isolate the ops code that processes the
        graph.
      3. torch._C.graph does not expose a Python constructor. This makes
        it impossible to write unit tests that isolate specific ops since
        they have to come from actually converting a PyTorch graph. With an
        internal structure, we can directly build the test cases we need for
        unit testing.
  
      Arguments:
          raw_graph: raw_graph: The torch._C.Graph to convert, or None.
          params_dict: A dictionary mapping graph parameter names to tensors.
              Must be given if @raw_graph is not None.
          input_values: A list of inputs to the graph. Must be given is
              @raw_graph if not None.
          cut_at_symbols: The list of desired outputs from the graph. Symbols
              must be present in the graph. For debugging use only. Can only
              be given if @raw_graph is not None.
          nodes: If @raw_graph is None, the list of InternalTorchIRNodes in
              the graph.
          params: If @raw_graph is None, the dict mapping parameter names to
              their numpy value.
          inputs: If @raw_graph is None, the OrderedDict mapping input names
              to their example values.
          outputs: If @raw_graph is None, the list of outputs from the graph.
code: def __init__(
      self,
      raw_graph=None,
      params_dict=None,
      input_values=None,
      cut_at_symbols=None,
      nodes=None,
      params=None,
      inputs=None,
      outputs=None,
  ):
      self.nodes = []
      node_names = set()
      self.params = {}
      self.inputs = OrderedDict()
      self.outputs = []
  
      if raw_graph is not None:
          # Add nodes
          for raw_node in raw_graph.nodes():
              new_node = InternalTorchIRNode(raw_node, parent=self)
              if new_node.name == new_node.kind:
                  new_node.name = _find_new_name(
                      new_node.name, node_names
                  )
              self.nodes.append(new_node)
              node_names.add(new_node.name)
  
          # Add params
          for name, param in params_dict.items():
              value = param.detach().numpy()
              self.params[name] = value
  
          # Add inputs
          for index, _input in enumerate(
              islice(raw_graph.inputs(), len(input_values))
          ):
              name = _input.debugName()
              value = input_values[index]
              self.inputs[name] = value
  
          # Add outputs, cutting if @cut_at_symbols is set
          output_names = cut_at_symbols
          if output_names is None:
              output_names = [
                  x.debugName() for x in raw_graph.outputs()
              ]
          for output in output_names:
              self.outputs.append(output)
      else:
          self.nodes = nodes
          self.params = params
          self.inputs = inputs
          self.outputs = outputs
  
imports: from collections import OrderedDict
  from itertools import islice
  import torch
label_desc: Use image node_id 1 to create a new InternalTorchIRGraph object  with example: obj = InternalTorchIRGraph(raw_graph, params_dict, input_values, cut_at_symbols, nodes, params, inputs, outputs)