code: def get_session():
      """Get the globally defined TensorFlow session.
  
      If the session is not already defined, then the function will create
      a global session.
  
      Returns:
        _ED_SESSION: tf.InteractiveSession.
      """
      global _ED_SESSION
      if tf.get_default_session() is None:
          _ED_SESSION = tf.InteractiveSession()
      else:
          _ED_SESSION = tf.get_default_session()
  
      save_stderr = sys.stderr
      try:
          import os
  
          sys.stderr = open(os.devnull, "w")  # suppress keras import
          from keras import backend as K
  
          sys.stderr = save_stderr
          have_keras = True
      except ImportError:
          sys.stderr = save_stderr
          have_keras = False
      if have_keras:
          K.set_session(_ED_SESSION)
  
      return _ED_SESSION
  
file_path: edward/edward/util/graphs.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import six
  import sys
  import tensorflow
  from edward.models.random_variable import _RANDOM_VARIABLE_COLLECTION
label_desc: Use image node_id 1 for calling a global function with example usage: get_session() and returns: _ED_SESSION