code: def get_session():
      try:
          # use the keras session if there is one
          import keras.backend as K
  
          return K.get_session()
      except:
          # Warning: I haven't really tested this behaviour out...
          global _SESS
          if _SESS is None:
              print("MAKING A SESSION")
              _SESS = tf.Session()
              _SESS.run(tf.global_variables_initializer())
          return _SESS
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import absolute_import
  import sys
  import os
  import os.path
  import numpy
  from collections import namedtuple
  from collections import OrderedDict
  import json
  import deeplift
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: get_session() and returns: K, _SESS