docstr: Returns the session object for the current thread.
docstr_tok: ["Returns","the","session","object","for","the","current","thread","."]
code: def get_session(op_input_list=()):
      """Returns the session object for the current thread."""
      _SESSION = keras.backend._SESSION  # noqa:N806
      default_session = ops.get_default_session()
      if default_session is not None:
          session = default_session
      else:
          if ops.inside_function():
              raise RuntimeError(
                  "Cannot get session inside Tensorflow graph function."
              )
          # If we don't have a session, or that session does not match the current
          # graph, create and cache a new session.
          if getattr(_SESSION, "session", None) is None:
              if getattr(keras.backend, "READY_FOR_AUTODIST", False):
                  _SESSION.session = (
                      autodist.autodist.get_default_autodist().create_distributed_session()
                  )
              else:
                  _SESSION.session = session_module.Session(
                      config=get_default_session_config()
                  )
          session = _SESSION.session
      return session
  
imports: from collections import deque
  from itertools import chain
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python import keras
  from tensorflow.python.client import session
  from tensorflow.python.framework import ops
  from tensorflow.python.keras.engine import training
  from tensorflow.python.keras.optimizer_v2.optimizer_v2 import OptimizerV2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.resource_variable_ops import ResourceVariable
  from tensorflow.python.training.optimizer import Optimizer
  import autodist.autodist
  from autodist.graph_item import wrap_optimizer_init, wrap_optimizer_apply_gradient
  from autodist.runner import get_default_session_config
  from autodist.utils import logging
label_desc: Use image node_id 1 for calling the _KerasPatch obj's underlying member method code with example usage: obj.get_session(op_input_list) and returns: session