code: def global_step(self) -> int:
          
          if self.session is None or self.global_step_tensor is None:
              return self.iteration_no + self.init_global_step
          else:
              return self.session.run(self.global_step_tensor)
docs: Evaluates the value of the global step variable if it is set, otherwise returns the
          current iteration number.