class_docstr: Add the "length" of an array along the specified axis.
  
  For example, if target field in the input DataEntry has a shape
  of (32, 24, 3), the axis can be specified as 1 to return 24 for
  the output field. If the target field is a list instead, its
  length will be added.
  
  Parameters
  ----------
  target_field
      Field with target values (array) of time series
  axis
      Axis to output lengths (dimensions) on. Default 0.
  output_field
      Name of newly created field
code: def transform(self, data: DataEntry) -> DataEntry:
      target = data[self.target_field]
      data[self.output_field] = np.array(
          [
              len(target)
              if isinstance(target, list)
              else target.shape[self.axis]
          ]
      )
      return data
  
file_path: gluonts/src/gluonts/mx/model/renewal/_transform.py
imports: import numpy
  from gluonts.core.component import validated
  from gluonts.dataset.common import DataEntry
  from gluonts.dataset.field_names import FieldName
  from gluonts.transform import SimpleTransformation
label_desc: Use image node_id 2 for calling the AddAxisLength obj's underlying member method code with example usage: obj.transform(data) and returns: data