code: def check_operator_coord_flip(
      device, batch_size, layout, shape, center_x, center_y, center_z
  ):
      eii1 = RandomDataIterator(
          batch_size, shape=shape, dtype=np.float32
      )
      pipe = CoordFlipPipeline(
          device,
          batch_size,
          iter(eii1),
          layout,
          center_x,
          center_y,
          center_z,
      )
      pipe.build()
      for i in range(30):
          outputs = pipe.run()
          for sample in range(batch_size):
              in_coords = outputs[0].at(sample)
              if device == "gpu":
                  out_coords = outputs[1].as_cpu().at(sample)
              else:
                  out_coords = outputs[1].at(sample)
              if in_coords.shape == () or in_coords.shape[0] == 0:
                  assert (
                      out_coords.shape == () or out_coords.shape[0] == 0
                  )
                  continue
  
              flip_x = outputs[2].at(sample)
              flip_y = outputs[3].at(sample)
              flip_z = None
              if len(layout) == 3:
                  flip_z = outputs[4].at(sample)
              _, ndim = in_coords.shape
  
              flip_dim = [flip_x, flip_y]
              if ndim == 3:
                  flip_dim.append(flip_z)
  
              center_dim = [center_x, center_y]
              if ndim == 3:
                  center_dim.append(center_z)
  
              expected_out_coords = np.copy(in_coords)
              for d in range(ndim):
                  if flip_dim[d]:
                      expected_out_coords[:, d] = (
                          2 * center_dim[d] - in_coords[:, d]
                      )
              np.testing.assert_allclose(
                  out_coords[:, d], expected_out_coords[:, d]
              )
  
file_path: DALI/dali/test/python/operator_1/test_coord_flip.py
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.fn
  import numpy
  from test_utils import RandomDataIterator
label_desc: Use image node_id 1 for calling a global function with example usage: check_operator_coord_flip(device, batch_size, layout, shape, center_x, center_y, center_z) without return types