<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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))