code: def create_session(self):
      sess = tf.Session(target=self.target, config=self.config)
  
      def blocking_op(x):
          """
          Whether an op is possibly blocking.
          """
          if x.op_def is not None and not x.op_def.is_stateful:
              return False
          if "Dequeue" in x.type or "Enqueue" in x.type:
              return True
          if "Unstage" in x.type:
              return True
          if x.type in ["ZMQPull"]:
              return True
          return False
  
      def run(op):
          if op is None:  # No such variables.
              return
          try:
              from tensorflow.contrib.graph_editor import (
                  get_backward_walk_ops,
              )  # deprecated
          except ImportError:
              from tensorflow.python.ops.op_selector import (
                  get_backward_walk_ops,
              )
  
          deps = get_backward_walk_ops(op, control_inputs=True)
          for dep_op in deps:
              if blocking_op(dep_op):
                  logger.warn(
                      "Initializer '{}' depends on a blocking op '{}'. "
                      "This initializer is likely to hang!".format(
                          op.name, dep_op.name
                      )
                  )
  
          sess.run(op)
  
      run(tf.global_variables_initializer())
      run(tf.local_variables_initializer())
      run(tf.tables_initializer())
      return sess
  
file_path: tensorpack/tensorpack/tfutils/sesscreate.py
imports: from ..compat import tfv1
  from ..utils import logger
  from .common import get_default_sess_config
label_desc: Use image node_id 2 for calling the NewSessionCreator obj's underlying member method code with example usage: obj.create_session() and returns: sess, False, False, True, True, True