class_docstr: An implementation of EventListenerBaseServicer for testing.
class_docstr_tok: ["An","implementation","of","EventListenerBaseServicer","for","testing","."]
docstr: Constructor of EventListenerTestServicer.
  
  Args:
    server_port: (int) The server port number.
    dump_dir: (str) The root directory to which the data files will be
      dumped. If empty or None, the received debug data will not be dumped
      to the file system: they will be stored in memory instead.
    toggle_watch_on_core_metadata: A list of
      (node_name, output_slot, debug_op) tuples to toggle the
      watchpoint status during the on_core_metadata calls (optional).
docstr_tok: ["Constructor","of","EventListenerTestServicer",".","Args",":","server_port",":","(","int",")","The","server","port","number",".","dump_dir",":","(","str",")","The","root","directory","to","which","the","data","files","will","be","dumped",".","If","empty","or","None",",","the","received","debug","data","will","not","be","dumped","to","the","file","system",":","they","will","be","stored","in","memory","instead",".","toggle_watch_on_core_metadata",":","A","list","of","(","node_name",",","output_slot",",","debug_op",")","tuples","to","toggle","the","watchpoint","status","during","the","on_core_metadata","calls","(","optional",")","."]
code: def __init__(
      self, server_port, dump_dir, toggle_watch_on_core_metadata=None
  ):
      """Constructor of EventListenerTestServicer.
  
      Args:
        server_port: (int) The server port number.
        dump_dir: (str) The root directory to which the data files will be
          dumped. If empty or None, the received debug data will not be dumped
          to the file system: they will be stored in memory instead.
        toggle_watch_on_core_metadata: A list of
          (node_name, output_slot, debug_op) tuples to toggle the
          watchpoint status during the on_core_metadata calls (optional).
      """
      self.core_metadata_json_strings = []
      self.partition_graph_defs = []
      self.debug_tensor_values = collections.defaultdict(list)
      self._initialize_toggle_watch_state(toggle_watch_on_core_metadata)
  
      grpc_debug_server.EventListenerBaseServicer.__init__(
          self,
          server_port,
          functools.partial(
              EventListenerTestStreamHandler, dump_dir, self
          ),
      )
  
      # Members for storing the graph ops traceback and source files.
      self._call_types = []
      self._call_keys = []
      self._origin_stacks = []
      self._origin_id_to_strings = []
      self._graph_tracebacks = []
      self._graph_versions = []
      self._source_files = []
  
imports: import collections
  import errno
  import functools
  import hashlib
  import json
  import os
  import re
  import tempfile
  import threading
  import time
  import portpicker
  from tensorflow.core.debug import debug_service_pb2
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.util import event_pb2
  from tensorflow.python.client import session
  from tensorflow.python.debug.lib import debug_data
  from tensorflow.python.debug.lib import debug_utils
  from tensorflow.python.debug.lib import grpc_debug_server
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import errors
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.ops import variables
  from tensorflow.python.util import compat
label_desc: Use image node_id 1 to create a new EventListenerTestServicer object from inherited base classes: grpc_debug_server with example: obj = EventListenerTestServicer(server_port, dump_dir, toggle_watch_on_core_metadata)