class_docstr: A class representing a mean scaling approach. Inputs are simply rescaled
  based on their mean.
  
  Parameters
  ----------
  minimum_scale
      The minimum value to which re-scaled values will be clipped to.
      (default: 1e-10)
  clip_max
      The maximum value to which re-scaled values will be clipped to.
      Negative values will be clipped at -clip_max and positive values at
      clip_max. (default: None)
code: def compute_scale(
      self,
      F,
      data: Tensor,
      observed_indicator: Tensor,  # shapes (N, T, C)
  ) -> Tensor:
      # these will have shape (N, C)
      num_observed = F.sum(observed_indicator, axis=1)
      sum_observed = (data.abs() * observed_indicator).sum(axis=1)
  
      # first compute a global scale per-dimension
      total_observed = num_observed.sum(axis=0)
      denominator = F.maximum(total_observed, 1.0)
      default_scale = (
          sum_observed.sum(axis=0) / denominator
      )  # shape (C, )
  
      # then compute a per-item, per-dimension scale
      denominator = F.maximum(num_observed, 1.0)
      scale = sum_observed / denominator  # shape (N, C)
  
      # use per-batch scale when no element is observed
      # or when the sequence contains only zeros
      cond = F.broadcast_greater(
          sum_observed, F.zeros_like(sum_observed)
      )
      scale = F.where(
          cond,
          scale,
          F.broadcast_mul(default_scale, F.ones_like(num_observed)),
      )
  
      return F.maximum(scale, self.scale_min)
  
file_path: gluonts/src/gluonts/mx/representation/mean_scaling.py
imports: from typing import List, Optional, Tuple
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from .representation import Representation
label_desc: Use image node_id 2 for calling the MeanScaling obj's underlying member method code with example usage: obj.compute_scale(F, data, observed_indicator) and returns: F