class_docstr: A class representing a global relative binning approach. This binning first
  rescales all input series by their respective mean (relative) and then
  performs one binning across all series (global).
  
  Parameters
  ----------
  num_bins
      The number of discrete bins/buckets that we want values to be mapped
      to.
      (default: 1024)
  is_quantile
      Whether the binning is quantile or linear. Quantile binning allocated
      bins based on the cumulative distribution function, while linear
      binning allocates evenly spaced bins.
      (default: True, i.e. quantile binning)
  
  linear_scaling_limit
      The linear scaling limit. Values which are larger than
      linear_scaling_limit times the mean will be capped at
      linear_scaling_limit.
      (default: 10)
  quantile_scaling_limit
      The quantile scaling limit. Values which are larger than the quantile
      evaluated at quantile_scaling_limit will be capped at the quantile
      evaluated at quantile_scaling_limit.
      (default: 0.99)
code: def hybrid_forward(
      self,
      F,
      data: Tensor,
      observed_indicator: Tensor,
      scale: Optional[Tensor],
      rep_params: List[Tensor],
      **kwargs,
  ) -> Tuple[Tensor, Tensor, List[Tensor]]:
      bin_edges = kwargs["bin_edges"]
      bin_centers = kwargs["bin_centers"]
  
      # Calculate local scale if scale is not already supplied.
      if scale is None:
          scale = F.expand_dims(
              F.sum(data * observed_indicator, axis=-1)
              / F.sum(observed_indicator, axis=-1),
              -1,
          )
          # Clip scale on the bottom to prevent division by zero.
          scale = F.clip(scale, 1e-20, np.inf)
  
      # Rescale the data.
      data_rescaled = F.broadcast_div(data, scale)
  
      # Discretize the data.
      data = F.Custom(data_rescaled, bin_edges, op_type="digitize")
  
      # Bin centers for later usage in post_transform.
      bin_centers_hyb = F.repeat(
          F.expand_dims(bin_centers, axis=0), len(data), axis=0
      )
  
      return data, scale, [bin_centers_hyb, bin_edges]
  
file_path: gluonts/src/gluonts/mx/representation/global_relative_binning.py
imports: from typing import List, Optional, Tuple
  import mxnet
  import numpy
  from gluonts.core.component import validated
  from gluonts.dataset.common import Dataset
  from gluonts.mx import Tensor
  from gluonts.mx.context import get_mxnet_context
  from .binning_helpers import bin_edges_from_bin_centers, ensure_binning_monotonicity
  from .representation import Representation
label_desc: Use image node_id 4 for calling the GlobalRelativeBinning obj's underlying member method code with example usage: obj.hybrid_forward(F, data, observed_indicator, scale, rep_params) and returns: data,  scale,  list