code: def _add_cyclic_data(data, axis=-1):
      """
      Add a cyclic point to a data array.
  
      Parameters
      ----------
      data : ndarray
          An n-dimensional array of data to add a cyclic point to.
      axis : int, optional
          Specifies the axis of the data array to add the cyclic point to.
          Defaults to the right-most axis.
  
      Returns
      -------
      The data array with a cyclic point added.
  
      """
      slicer = [slice(None)] * data.ndim
      try:
          slicer[axis] = slice(0, 1)
      except IndexError:
          raise ValueError(
              "The specified axis does not correspond to an array dimension."
          )
      npc = np.ma if np.ma.is_masked(data) else np
      return npc.concatenate((data, data[tuple(slicer)]), axis=axis)
  
imports: import numpy
  import numpy.ma
label_desc: Use image node_id 2 for calling a global function with example usage: _add_cyclic_data(data, axis) and returns: npc