code: def maybe_download_example_image(folders, file_name, shape=None):
      """Download the given ExampleImages file if not in the directory
  
      folders - sequence of subfolders starting at ExampleImages
      file_name - name of file to fetch
  
      Image will be downloaded if not present to CP_EXAMPLEIMAGES directory.
  
      Returns the local path to the file which is often useful.
      """
      if shape is None:
          shape = (20, 30)
      local_path = os.path.join(
          *tuple([example_images_directory()] + folders + [file_name])
      )
      if not os.path.exists(local_path):
          directory = os.path.join(
              *tuple([example_images_directory()] + folders)
          )
          if not os.path.isdir(directory):
              os.makedirs(directory)
          random_state = np.random.RandomState()
          random_state.seed()
          image = (random_state.uniform(size=shape) * 255).astype(
              np.uint8
          )
  
          if len(shape) > 2:
              skimage.io.imsave(
                  local_path,
                  numpy.transpose(image, (2, 0, 1)),
                  imagej=True,
              )
          else:
              skimage.io.imsave(local_path, image)
  
      return local_path
  
imports: import logging
  import base64
  import hashlib
  import numpy
  import os
  import unittest
  import tempfile
  import functools
  import scipy.io.matlab.mio
  import numpy
  import skimage.io
  from urllib.request import URLopener
  import cellprofiler_core.utilities.legacy
  from cellprofiler_core.pipeline import ImageFile
  import tests.frontend
label_desc: Use image node_id 8 for calling a global function with example usage: maybe_download_example_image(folders, file_name, shape) and returns: local_path