code: def session_end_pb(status, end_time_secs=None):
      """Constructs a SessionEndInfo protobuffer.
  
      Creates a summary that contains status information for a completed
      training session. Should be exported after the training session is completed.
      One such summary per training session should be created. Each should have
      a different run.
  
      Args:
        status: A tensorboard.hparams.Status enumeration value denoting the
            status of the session.
        end_time_secs: float. The time to use as the session end time. Represented
            as seconds since the unix epoch. If None uses the current time.
  
      Returns:
        The summary protobuffer mentioned above.
      """
      if end_time_secs is None:
          end_time_secs = time.time()
  
      session_end_info = plugin_data_pb2.SessionEndInfo(
          status=status, end_time_secs=end_time_secs
      )
      return _summary(
          metadata.SESSION_END_INFO_TAG,
          plugin_data_pb2.HParamsPluginData(
              session_end_info=session_end_info
          ),
      )
  
file_path: tensorboard/tensorboard/plugins/hparams/summary.py
imports: import time
  import tensorflow
  from tensorboard.plugins.hparams import api_pb2
  from tensorboard.plugins.hparams import metadata
  from tensorboard.plugins.hparams import plugin_data_pb2
label_desc: Use image node_id 3 for calling a global function with example usage: session_end_pb(status, end_time_secs) and returns: _summary