class_docstr: A helper class for handling relay graph copying from Tensorflow GraphDef.
  Definition:
      https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/framework/graph.proto
docstr: Convert the Relay Partition call ops into Relay Function calls and
  function definitions from Tensorflow graph library attribute to Relay global
  functions
  
  Parameters
  ----------
  node: TensorFlow graph node object.
      A TensorFlow graph node object.
  
  inputs : List[tvm.relay.Expr]
      List of input symbols.
  
  attrs : Dict[tvm.Attrs]
      Dict of operator attributes.
  
  Returns
  -------
  op : tvm.relay.Expr
      Converted relay expression.
docstr_tok: ["Convert","the","Relay","Partition","call","ops","into","Relay","Function","calls","and","function","definitions","from","Tensorflow","graph","library","attribute","to","Relay","global","functions","Parameters","--","--","--","--","--","node",":","TensorFlow","graph","node","object",".","A","TensorFlow","graph","node","object",".","inputs",":","List","[","tvm.relay.Expr","]","List","of","input","symbols",".","attrs",":","Dict","[","tvm.Attrs","]","Dict","of","operator","attributes",".","Returns","--","--","--","-","op",":","tvm.relay.Expr","Converted","relay","expression","."]
code: def _partition_call_operator(self, inputs, attr):
      """
      Convert the Relay Partition call ops into Relay Function calls and
      function definitions from Tensorflow graph library attribute to Relay global
      functions
  
      Parameters
      ----------
      node: TensorFlow graph node object.
          A TensorFlow graph node object.
  
      inputs : List[tvm.relay.Expr]
          List of input symbols.
  
      attrs : Dict[tvm.Attrs]
          Dict of operator attributes.
  
      Returns
      -------
      op : tvm.relay.Expr
          Converted relay expression.
      """
  
      try:
          from tensorflow.python.framework import function_def_to_graph
      except ImportError as e:
          raise ImportError(
              f"Unable to import tensorflow which is required {e}"
          )
  
      main_graph_proto = self._main_graph_proto
      outer_graph_def = main_graph_proto._graph
  
      node_func_name = attr.get("f").name
      func = next(
          (
              f
              for f in outer_graph_def.library.function
              if f.signature.name == node_func_name
          ),
          None,
      )
      if func:
          devices = set(node.device for node in func.node_def)
          if len(devices) > 1:
              raise Exception(
                  "Found inconsistent Device assignment in the "
                  "Stateful Partitioned SubGraph. Rejecting "
                  "the subgraph "
              )
          # Convert function definition to graph
          func_input_shapes = func.attr["_input_shapes"].list.shape
          subgraph, _ = function_def_to_graph.function_def_to_graph_def(
              func, func_input_shapes
          )
  
          # Computing subgraph's input shape dictionary
          subgraph_shape_dict, input_expr_dict = {}, {}
          for f_arg, input in zip(func.signature.input_arg, inputs):
              input_expr_dict[f_arg.name] = input
              subgraph_shape_dict[f_arg.name] = _infer_shape(
                  input, main_graph_proto._mod
              )
  
          func_name = f"func_{func.signature.name}"
          try:
              global_func = main_graph_proto._mod[func_name]
              sub_func = global_func
              sub_params = main_graph_proto._params
          except ValueError:
              # Construct relay nodes from the subgraph
              g1 = SubGraphProto(main_graph_proto)
              sub_func, sub_params = g1.from_tensorflow(
                  subgraph, shape=subgraph_shape_dict
              )
              main_graph_proto._params.update(sub_params)
              func_expr = _function.Function(
                  sub_func.params, sub_func.body
              )
              global_func = tvm.relay.GlobalVar(func_name)
              main_graph_proto._mod[global_func] = func_expr
              main_graph_proto._mod = InferType()(main_graph_proto._mod)
  
          param_exprs = []
          for param_expr in sub_func.params:
              # sub_params is subset of sub_func.params
              param_name = param_expr.vid.name_hint
              if param_name in input_expr_dict.keys():
                  param_exprs.append(input_expr_dict[param_name])
              elif param_name in sub_params.keys():
                  param_exprs.append(param_expr)
              else:
                  raise Exception(
                      f"Input parameter {param_name} not found"
                  )
  
          sb = tvm.relay.scope_builder.ScopeBuilder()
          loop_ret = global_func(*param_exprs)
          sb.ret(loop_ret)
          ret = sb.get()
      else:
          raise Exception(f"Function not found - {node_func_name}")
      return ret
  
imports: import warnings
  from collections import defaultdict
  import numpy
  import tvm
  from tvm.ir import IRModule
  from tvm.relay.prelude import Prelude
  from tvm.relay.transform import InferType
  from ..None import analysis
  from ..None import expr
  from ..None import function
  from ..ty import Any
  from ..expr_functor import ExprMutator, ExprVisitor
  from .common import get_relay_op
  from .common import infer_type
  from .common import infer_shape
  from .common import infer_value
  from .common import set_span
  from .tensorflow_ops import _convert_map
  from .tensorflow_ops import _need_prelude_for_shape_inference
  from .tensorflow_ops import _get_more_static_shape
label_desc: Use image node_id 9 for calling the GraphProto obj's underlying member method code with example usage: obj._partition_call_operator(inputs, attr) and returns: ret