code: def test_operator_noise_salt_and_pepper():
      niter = 3
      probs = [None, 0.021, 0.5]
      salt_and_pepper_probs = [None, 1.0, 0.5, 0.0]
      for device in ["cpu", "gpu"]:
          for per_channel in [False, True]:
              for channel_first in [False, True]:
                  for pepper_val, salt_val in [(None, None), (10, 50)]:
                      for prob in probs:
                          salt_and_pepper_prob = random.choice(
                              salt_and_pepper_probs
                          )
                          batch_size = random.choice([1, 3])
                          yield (
                              _testimpl_operator_noise_salt_and_pepper,
                              device,
                              per_channel,
                              prob,
                              salt_and_pepper_prob,
                              channel_first,
                              salt_val,
                              pepper_val,
                              batch_size,
                              niter,
                          )
  
file_path: DALI/dali/test/python/operator_1/test_noise_salt_and_pepper.py
imports: from nvidia.dali import pipeline_def
  import nvidia.dali.fn
  import nvidia.dali.types
  import random
  import numpy
  import os
  from test_utils import get_dali_extra_path
  from test_noise_utils import PSNR
label_desc: Use image node_id 5 for calling a global function with example usage: test_operator_noise_salt_and_pepper() without return types