code: def _add_cyclic_x(x, axis=-1, cyclic=360):
      """
      Add a cyclic point to a x/longitude coordinate array.
  
      Parameters
      ----------
      x : ndarray
          An array which specifies the x-coordinate values for
          the dimension the cyclic point is to be added to.
      axis : int, optional
          Specifies the axis of the x-coordinate array to add the cyclic point
          to. Defaults to the right-most axis.
      cyclic : float, optional
          Width of periodic domain (default: 360)
  
      Returns
      -------
      The coordinate array ``x`` with a cyclic point added.
  
      """
      npc = np.ma if np.ma.is_masked(x) else np
      # get cyclic x-coordinates
      # cx is the code from basemap (addcyclic)
      # https://github.com/matplotlib/basemap/blob/master/lib/mpl_toolkits/basemap/__init__.py
      cx = np.take(x, [0], axis=axis) + cyclic * np.sign(
          np.diff(np.take(x, [0, -1], axis=axis), axis=axis)
      )
      # basemap ensures that the values do not exceed cyclic
      # (next code line). We do not do this to deal with rotated grids that
      # might have values not exactly 0.
      #     cx = npc.where(cx <= cyclic, cx, np.mod(cx, cyclic))
      return npc.concatenate((x, cx), axis=axis)
  
imports: import numpy
  import numpy.ma
label_desc: Use image node_id 3 for calling a global function with example usage: _add_cyclic_x(x, axis, cyclic) and returns: npc