code: def testimages_directory():
      global __temp_test_images_folder
      if "CP_TESTIMAGES" in os.environ:
          return os.environ["CP_TESTIMAGES"]
      fyle = os.path.abspath(__file__)
      d = os.path.split(fyle)[
          0
      ]  # trunk.CellProfiler.tests.frontend.modules
      d = os.path.split(d)[0]  # trunk.CellProfiler.cellprofiler.modules
      d = os.path.split(d)[0]  # trunk.CellProfiler.cellprofiler
      d = os.path.split(d)[0]  # trunk.CellProfiler
      d = os.path.split(d)[0]  # trunk
      path = os.path.join(d, "TestImages")
      if os.path.exists(path):
          return path
      if __temp_test_images_folder is None:
          __temp_test_images_folder = tempfile.mkdtemp(
              prefix="cp_testimages"
          )
          LOGGER.warning(
              "Creating temporary folder %s for test images"
              % __temp_test_images_folder
          )
      return __temp_test_images_folder
  
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 5 for calling a global function with example usage: testimages_directory() and returns: __temp_test_images_folder, os, path