class_docstr: Base Python class for gRPC debug server.
class_docstr_tok: ["Base","Python","class","for","gRPC","debug","server","."]
docstr: Process an Event proto containing a chunk of encoded GraphDef.
  
  Args:
    event: the Event proto containing the chunk of encoded GraphDef.
    graph_def_chunks: A dict mapping keys for GraphDefs (i.e.,
    "<graph_def_hash>,<device_name>,<wall_time>") to a list of chunks of
    encoded GraphDefs.
  
  Returns:
    If all chunks of the GraphDef have arrived,
      return decoded GraphDef proto, device name, wall_time.
    Otherwise,
      return None, None, None.
docstr_tok: ["Process","an","Event","proto","containing","a","chunk","of","encoded","GraphDef",".","Args",":","event",":","the","Event","proto","containing","the","chunk","of","encoded","GraphDef",".","graph_def_chunks",":","A","dict","mapping","keys","for","GraphDefs","(","i.e.",",","``","<","graph_def_hash",">",",","<","device_name",">",",","<","wall_time",">","''",")","to","a","list","of","chunks","of","encoded","GraphDefs",".","Returns",":","If","all","chunks","of","the","GraphDef","have","arrived",",","return","decoded","GraphDef","proto",",","device","name",",","wall_time",".","Otherwise",",","return","None",",","None",",","None","."]
code: def _process_encoded_graph_def_in_chunks(
      self, event, graph_def_chunks
  ):
      """Process an Event proto containing a chunk of encoded GraphDef.
  
      Args:
        event: the Event proto containing the chunk of encoded GraphDef.
        graph_def_chunks: A dict mapping keys for GraphDefs (i.e.,
        "<graph_def_hash>,<device_name>,<wall_time>") to a list of chunks of
        encoded GraphDefs.
  
      Returns:
        If all chunks of the GraphDef have arrived,
          return decoded GraphDef proto, device name, wall_time.
        Otherwise,
          return None, None, None.
      """
      graph_def = graph_pb2.GraphDef()
      index_bar_0 = event.graph_def.find(b"|")
      index_bar_1 = event.graph_def.find(b"|", index_bar_0 + 1)
      index_bar_2 = event.graph_def.find(b"|", index_bar_1 + 1)
      graph_def_hash_device_timestamp = event.graph_def[:index_bar_0]
      chunk_index = int(event.graph_def[index_bar_0 + 1 : index_bar_1])
      num_chunks = int(event.graph_def[index_bar_1 + 1 : index_bar_2])
      if graph_def_hash_device_timestamp not in graph_def_chunks:
          graph_def_chunks[graph_def_hash_device_timestamp] = [
              None
          ] * num_chunks
      graph_def_chunks[graph_def_hash_device_timestamp][
          chunk_index
      ] = event.graph_def[index_bar_2 + 1 :]
      if all(graph_def_chunks[graph_def_hash_device_timestamp]):
          device_name = graph_def_hash_device_timestamp.split(b",")[1]
          wall_time = int(
              graph_def_hash_device_timestamp.split(b",")[2]
          )
          graph_def.ParseFromString(
              b"".join(
                  graph_def_chunks[graph_def_hash_device_timestamp]
              )
          )
          del graph_def_chunks[graph_def_hash_device_timestamp]
          self._process_graph_def(graph_def)
          return graph_def, device_name, wall_time
      else:
          return None, None, None
  
imports: import collections
  import json
  import queue
  import threading
  import time
  from concurrent import futures
  import grpc
  from tensorflow.core.debug import debug_service_pb2
  from tensorflow.core.framework import graph_pb2
  from tensorflow.python.debug.lib import debug_graphs
  from tensorflow.python.debug.lib import debug_service_pb2_grpc
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import compat
label_desc: Use image node_id 5 for calling the EventListenerBaseServicer obj's underlying member method code with example usage: obj._process_encoded_graph_def_in_chunks(event, graph_def_chunks) and returns: graph_def,  device_name,  wall_time, None,  None,  None