code: def test_equivalence():
      rng = random.Random(42)
      for device in ["cpu", "gpu"]:
          for inp_dtype in [types.FLOAT, types.INT16, types.UINT8]:
              for out_dtype in [types.FLOAT, types.INT16, types.UINT8]:
                  for op in ["brightness", "contrast"]:
                      for (
                          has_3_dims,
                          use_const_contr_center,
                      ) in rng.sample(
                          [
                              (b1, b2)
                              for b1 in [True, False]
                              for b2 in [True, False]
                          ],
                          2,
                      ):
                          yield (
                              check_equivalence,
                              device,
                              inp_dtype,
                              out_dtype,
                              op,
                              has_3_dims,
                              use_const_contr_center,
                          )
  
imports: import nvidia.dali.fn
  from nvidia.dali import pipeline_def
  import nvidia.dali.types
  import numpy
  from test_utils import compare_pipelines, python_function
  from test_utils import RandomDataIterator
  from sequences_test_utils import ArgCb, video_suite_helper
  import random
label_desc: Use image node_id 14 for calling a global function with example usage: test_equivalence() without return types