code: def gpu_dynamic_mem_growth():
      """Borrowed from
      https://github.com/philipperemy/keract/tree/master/examples.
  
      Check for GPUs and set them to dynamically grow memory as needed
      Avoids OOM from tensorflow greedily allocating GPU memory
      """
      try:
          gpu_devices = tf.config.list_physical_devices("GPU")
          if len(gpu_devices) > 0:
              for gpu in gpu_devices:
                  tf.config.experimental.set_memory_growth(gpu, True)
              print("GPU dynamic memory growth enabled")
          else:
              print("No GPU found on the machine!")
      except AttributeError:
          print(
              "Upgrade your tensorflow to 2.x to have the gpu_dynamic_mem_growth feature."
          )
  
imports: import os
  import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: gpu_dynamic_mem_growth() without return types