code: def pad_axis(
      a: np.ndarray,
      *,
      axis: int = 0,
      left: int = 0,
      right: int = 0,
      value=0,
  ) -> np.ndarray:
      """Similar to ``np.pad``, but pads only a single axis using `left` and
      `right` parameters.
      ::
          >>> pad_axis([1, 2, 3, 4], left=2, right=3)
          array([0, 0, 1, 2, 3, 4, 0, 0, 0])
      """
      a = np.array(a)
  
      pad_width = [(0, 0)] * a.ndim
      pad_width[axis] = (left, right)
      return np.pad(a, pad_width, constant_values=value)
  
file_path: gluonts/src/gluonts/zebras/_util.py
imports: import copy
  import dataclasses
  import numpy
  from toolz import valmap
label_desc: Use image node_id 1 for calling a global function with example usage: pad_axis(a) and returns: np