code: def make_session(
      config=None, num_cpu=None, make_default=False, graph=None
  ):
      """Returns a session that will use <num_cpu> CPU's only"""
      if num_cpu is None:
          num_cpu = int(
              os.getenv("RCALL_NUM_CPU", multiprocessing.cpu_count())
          )
      if config is None:
          config = tf.ConfigProto(
              allow_soft_placement=True,
              inter_op_parallelism_threads=num_cpu,
              intra_op_parallelism_threads=num_cpu,
          )
          config.gpu_options.allow_growth = True
  
      if make_default:
          return tf.InteractiveSession(config=config, graph=graph)
      else:
          return tf.Session(config=config, graph=graph)
  
file_path: nni/nni/algorithms/hpo/ppo_tuner/util.py
imports: import os
  import random
  import multiprocessing
  import numpy
  import tensorflow.compat.v1
  from gym.spaces import Discrete, Box, MultiDiscrete
label_desc: Use image node_id 11 for calling a global function with example usage: make_session(config, num_cpu, make_default, graph) and returns: tf, tf