code: def sg_summary_loss(tensor, prefix='losses', name=None):
      r
      # defaults
      prefix = '' if prefix is None else prefix + '/'
      # summary name
      name = prefix + _pretty_name(tensor) if name is None else prefix + name
      # summary statistics
      _scalar(name, tf.reduce_mean(tensor))
      _histogram(name + '-h', tensor)
docs: r"""Register `tensor` to summary report as `loss`
  
      Args:
        tensor: A `Tensor` to log as loss
        prefix: A `string`. A prefix to display in the tensor board web UI.
        name: A `string`. A name to display in the tensor board web UI.
  
      Returns:
        None