class_docstr: This class is for averaging loss across multiple processes if a distributed backend is used. True average is
  computed not running average. It does not accumulate gradients so the averaged loss cannot be used for optimization.
  If ``take_avg_loss`` is ``True``, the :meth:`update` method ``loss`` argument has to be a mean loss. If
  ``take_avg_loss`` is ``False`` then the :meth:`update` method ``loss`` argument has to be a sum of losses.
  
  See :doc:`PyTorch Lightning Metrics<pytorch-lightning:metrics>` for the metric usage instruction.
  
  Args:
      dist_sync_on_step:
          Synchronize metric state across processes at each method :meth:`forward` call before returning the
          value at the step
      process_group:
          Specify the process group on which synchronization is called. default: ``None`` (which selects the entire
          world)
      take_avg_loss:
          If ``True`` values of :meth:`update` method ``loss`` argument has to be a mean loss. If ``False``
          values of :meth:`update` method ``loss`` argument has to be a sum of losses. default: ``True``
docstr: Returns mean loss.
docstr_tok: ["Returns","mean","loss","."]
code: def compute(self):
      """
      Returns mean loss.
      """
      if self.num_measurements.eq(0):
          return torch.tensor(float("nan"))
      return self.loss_sum / self.num_measurements
  
imports: import torch
  from torchmetrics import Metric
label_desc: Use image node_id 3 for calling the GlobalAverageLossMetric obj's underlying member method code with example usage: obj.compute() and returns: unknown, torch