code: def get_global_step_value():
      """
      Returns:
          int: global_step value in current graph and session
  
      Has to be called under a default session.
      """
  
      return tfv1.train.global_step(
          tfv1.get_default_session(), get_global_step_var()
      )
  
file_path: tensorpack/tensorpack/tfutils/common.py
imports: import tensorflow
  from ..compat import tfv1
  from ..utils.argtools import graph_memoized
  from .collect_env import collect_env_info
label_desc: Use image node_id 3 for calling a global function with example usage: get_global_step_value() and returns: tfv1