class_docstr: Hook to print out examples per second.
  
  Total time is tracked and then divided by the total number of steps
  to get the average step time and then batch_size is used to determine
  the running average of examples per second. The examples per second for the
  most recent interval is also logged.
docstr: Called once before using the session to check global step.
docstr_tok: ["Called","once","before","using","the","session","to","check","global","step","."]
code: def begin(self):
      """Called once before using the session to check global step."""
      self._global_step_tensor = tf.compat.v1.train.get_global_step()
      if self._global_step_tensor is None:
          raise RuntimeError(
              "Global step should be created to use StepCounterHook."
          )
  
file_path: autodist/examples/benchmark/utils/logs/hooks.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from utils.logs import logger
label_desc: Use image node_id 2 for calling the ExamplesPerSecondHook obj's underlying member method code with example usage: obj.begin() without return types