def get_global_step_var():
    """ :returns: the global_step variable in the current graph. create if not existed"""
    try:
        return tf.get_default_graph().get_tensor_by_name(GLOBAL_STEP_VAR_NAME)
    except __HOLE__:
        var = tf.Variable(
            0, trainable=False, name=GLOBAL_STEP_OP_NAME)
        return var
dataset/ETHPy150Open ppwwyyxx/tensorpack/tensorpack/tfutils/common.py/get_global_step_var