code: def session(self, master='', config=None):
      
      session_manager = SESSION_MANAGER_FACTORY()
      # Initialization is handled manually at a later point and session_manager
      # is just used for distributed compatibility.
      with session_manager.prepare_session(master, None, config=config,
                                           init_fn=lambda _: None) as sess:
        try:
          yield sess
        finally:
          self.stop_queues()
docs: Takes care of starting any local servers and stopping queues on exit.
  
      In general, the Runner is designed to work with any user provided session,
      but this provides a convenience for properly stopping the queues.
  
      Args:
        master: The master session to use.
        config: A tf.ConfigProto or None.
  
      Yields:
        A session.