class_docstr: Test def add_cyclic(data, x=None, y=None, axis=-1,
                      cyclic=360, precision=1e-4):
  - variations of data, x, and y with and without axis keyword
  - different units of x - cyclic keyword
  - detection of cyclic points - precision keyword
  - error catching
code: def setup_class(cls):
      # 2d and 4d data
      cls.data2d = np.ones([3, 6]) * np.arange(6)
      cls.data4d = (
          np.ones([4, 6, 2, 3])
          * np.arange(6)[..., np.newaxis, np.newaxis]
      )
      # 1d lat (5) and lon (6)
      # len(lat) != data.shape[0]
      # len(lon) == data.shape[1]
      cls.lons = np.arange(0, 360, 60)
      cls.lats = np.arange(-90, 90, 180 / 5)
      # 2d lat and lon
      cls.lon2d, cls.lat2d = np.meshgrid(cls.lons, cls.lats)
      # 3d lat and lon but with different 3rd dimension (4) as 4d data (2)
      cls.lon3d = np.repeat(cls.lon2d, 4).reshape((*cls.lon2d.shape, 4))
      cls.lat3d = np.repeat(cls.lat2d, 4).reshape((*cls.lat2d.shape, 4))
      # cyclic data, lon, lat
      cls.c_data2d = np.concatenate(
          (cls.data2d, cls.data2d[:, :1]), axis=1
      )
      cls.c_data4d = np.concatenate(
          (cls.data4d, cls.data4d[:, :1]), axis=1
      )
      cls.c_lons = np.concatenate((cls.lons, np.array([360])))
      cls.c_lon2d = np.concatenate(
          (cls.lon2d, np.full((cls.lon2d.shape[0], 1), 360)), axis=1
      )
      cls.c_lon3d = np.concatenate(
          (
              cls.lon3d,
              np.full((cls.lon3d.shape[0], 1, cls.lon3d.shape[2]), 360),
          ),
          axis=1,
      )
      cls.c_lats = cls.lats
      cls.c_lat2d = np.concatenate(
          (cls.lat2d, cls.lat2d[:, -1:]), axis=1
      )
      cls.c_lat3d = np.concatenate(
          (cls.lat3d, cls.lat3d[:, -1:, :]), axis=1
      )
  
imports: import numpy
  import numpy.ma
  from numpy.testing import assert_array_equal
  import pytest
  from cartopy.util import add_cyclic, add_cyclic_point, has_cyclic
label_desc: Use image node_id 1 for calling the TestAddCyclic obj's underlying member method code with example usage: obj.setup_class(cls) without return types