code: def test_random_brightness_in_memory():
      tmp, tmpdir = create_colour_temp_image((800, 800), "JPEG")
  
      op = Operations.RandomBrightness(
          probability=1, min_factor=0.5, max_factor=1.5
      )
      tmp_im = []
      tmp_im.append(Image.open(tmp))
      tmp_im = op.perform_operation(tmp_im)
  
      assert tmp_im is not None
      assert isinstance(tmp_im[0], Image.Image)
  
      tmp_bw, tmpdir_bw = create_greyscale_temp_image((800, 800), "PNG")
  
      op = Operations.RandomBrightness(
          probability=1, min_factor=0.5, max_factor=1.5
      )
      tmp_im = []
      tmp_im.append(Image.open(tmp))
      tmp_im = op.perform_operation(tmp_im)
  
      assert tmp_im is not None
      assert isinstance(tmp_im[0], Image.Image)
  
      tmp.close()
      tmp_bw.close()
      shutil.rmtree(tmpdir)
      shutil.rmtree(tmpdir_bw)
  
file_path: Augmentor/tests/test_random_color_brightness_contrast.py
imports: import os
  import sys
  import tempfile
  import shutil
  from PIL import Image
  from Augmentor import Operations
  from util_funcs import create_colour_temp_image, create_greyscale_temp_image
label_desc: Use image node_id 3 for calling a global function with example usage: test_random_brightness_in_memory() without return types