code: def random_visual_effect_generator(
      contrast_range=(0.9, 1.1),
      brightness_range=(-0.1, 0.1),
      hue_range=(-0.05, 0.05),
      saturation_range=(0.95, 1.05),
  ):
      """Generate visual effect parameters uniformly sampled from the given intervals.
  
      Args
          contrast_factor:   A factor interval for adjusting contrast. Should be between 0 and 3.
          brightness_delta:  An interval between -1 and 1 for the amount added to the pixels.
          hue_delta:         An interval between -1 and 1 for the amount added to the hue channel.
                             The values are rotated if they exceed 180.
          saturation_factor: An interval for the factor multiplying the saturation values of each
                             pixel.
      """
      _check_range(contrast_range, 0)
      _check_range(brightness_range, -1, 1)
      _check_range(hue_range, -1, 1)
      _check_range(saturation_range, 0)
  
      def _generate():
          while True:
              yield VisualEffect(
                  contrast_factor=_uniform(contrast_range),
                  brightness_delta=_uniform(brightness_range),
                  hue_delta=_uniform(hue_range),
                  saturation_factor=_uniform(saturation_range),
              )
  
      return _generate()
  
imports: from __future__ import division
  import numpy
  import cv2
  from PIL import Image
  from .transform import change_transform_origin
label_desc: Use image node_id 10 for calling a global function with example usage: random_visual_effect_generator(contrast_range, brightness_range, hue_range, saturation_range) and returns: _generate