class_docstr: Implementation of EventListenerBaseStreamHandler that dumps to file.
class_docstr_tok: ["Implementation","of","EventListenerBaseStreamHandler","that","dumps","to","file","."]
code: def __init__(self, dump_dir, event_listener_servicer):
      super(EventListenerTestStreamHandler, self).__init__()
      self._dump_dir = dump_dir
      self._event_listener_servicer = event_listener_servicer
      if self._dump_dir:
          self._try_makedirs(self._dump_dir)
  
      self._grpc_path = None
      self._cached_graph_defs = []
      self._cached_graph_def_device_names = []
      self._cached_graph_def_wall_times = []
  
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 EventListenerTestStreamHandler object from inherited base classes: grpc_debug_server with example: obj = EventListenerTestStreamHandler(dump_dir, event_listener_servicer)