code: def _clone_session(session, graph=None):
      return session_lib.Session(
          target=session.sess_str,
          config=session._config,  # pylint: disable=protected-access
          graph=graph if graph else session.graph,
      )
  
imports: import threading
  import time
  from google.protobuf import text_format
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.util import event_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.tpu.ops import tpu_ops
  from tensorflow.python.training import session_run_hook
  from tensorflow.python.training import training_util
label_desc: Use image node_id 1 for calling a global function with example usage: _clone_session(session, graph) and returns: session_lib