code: def make_session(single_threaded):
      if not single_threaded:
          return tf1.Session()
      return tf1.Session(
          config=tf1.ConfigProto(
              inter_op_parallelism_threads=1,
              intra_op_parallelism_threads=1,
          )
      )
  
imports: from typing import Optional
  import gymnasium
  import numpy
  import tree
  import ray
  import ray.experimental.tf_utils
  from ray.rllib.models import ModelCatalog
  from ray.rllib.policy.policy import Policy
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils import deprecation_warning
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.filter import get_filter
  from ray.rllib.utils.framework import try_import_tf
  from ray.rllib.utils.spaces.space_utils import get_base_struct_from_space, unbatch
label_desc: Use image node_id 2 for calling a global function with example usage: make_session(single_threaded) and returns: tf1, tf1