def METHOD_NAME(summary_writer):
  """Sets the summary writer that events will be logged to.
  Calling any logging methods inside this module without calling this method
  will fail. If you don't want to log, call `set_summary_writer(None)`.
  Args:
    summary_writer: Either a SummaryWriter or None. None will cause messages not
    to be logged to any SummaryWriter, but they will still be passed to the
    platform logging module.
  """
  global _summary_writer
  _summary_writer = summary_writer