class_docstr: GraphItem is a TensorFlow Graph wrapper.
  
  It represents the states in-between consecutive AutoDist.kernel graph transformations.
  tf.Graph is the primary property of GraphItem, whereas MetaGraph is exported/generated on demand.
  
  A GraphItem can be constructed with either a `tf.Graph` or a `GraphDef`.
docstr: Deserialize a graph_item serialized proto message from a file path.
docstr_tok: ["Deserialize","a","graph_item","serialized","proto","message","from","a","file","path","."]
code: def deserialize(cls, path):
      """Deserialize a graph_item serialized proto message from a file path."""
      item_def = graphitem_pb2.GraphItem()
      with open(path, "rb") as f:
          item_def.ParseFromString(f.read())
      # GraphDef
      gdef = GraphDef()
      item_def.graph_def.Unpack(gdef)
      g = cls(graph_def=gdef)
      # Grad Target Pairs
      for k, v in item_def.grad_target_pairs.items():
          k = k.split(";")
          k = k[0] if len(k) == 1 else tuple(k)
          g._grad_target_pairs[k] = v
      # Info
      for a in item_def.info.variables:
          v = VariableDef()
          a.Unpack(v)
          g.info.update_variables([v], replace=False)
      for a in item_def.info.savers:
          v = SaverDef()
          a.Unpack(v)
          g.info.update_savers([v], replace=False)
      g.info.update_table_initializers(item_def.info.table_initializers)
      return g
  
imports: import contextlib
  import copy
  import functools
  from collections import defaultdict
  from typing import Union, Callable
  from google.protobuf.any_pb2 import Any
  from tensorflow.core.framework.graph_pb2 import GraphDef
  from tensorflow.core.framework.variable_pb2 import VariableDef
  from tensorflow.core.protobuf.saver_pb2 import SaverDef
  from tensorflow.python.framework import ops
  from tensorflow.python.framework.importer import import_graph_def
  from tensorflow.python.ops.resource_variable_ops import _from_proto_fn
  from tensorflow.python.ops.variables import Variable
  from autodist.const import COLOCATION_PREFIX
  from autodist.kernel.common import op_info
  from autodist.kernel.common.utils import parse_name_scope, get_op_name
  from autodist.proto import graphitem_pb2
  from autodist.utils import logging
label_desc: Use image node_id 24 for calling the GraphItem obj's underlying member method code with example usage: obj.deserialize(cls, path) and returns: g