code: def get_out_of_order(list_of_numbers):
      """Returns elements that break the monotonically non-decreasing trend.
  
      This is used to find instances of global step values that are "out-of-order",
      which may trigger TensorBoard event discarding logic.
  
      Args:
        list_of_numbers: A list of numbers.
  
      Returns:
        A list of tuples in which each tuple are two elements are adjacent, but the
        second element is lower than the first.
      """
      # TODO: Consider changing this to only check for out-of-order
      # steps within a particular tag.
      result = []
      # pylint: disable=consider-using-enumerate
      for i in range(len(list_of_numbers)):
          if i == 0:
              continue
          if list_of_numbers[i] < list_of_numbers[i - 1]:
              result.append(
                  (list_of_numbers[i - 1], list_of_numbers[i])
              )
      return result
  
file_path: tensorboard/tensorboard/backend/event_processing/event_file_inspector.py
imports: import dataclasses
  import itertools
  import os
  from typing import Any, Generator, Mapping
  from tensorboard.backend.event_processing import event_accumulator
  from tensorboard.backend.event_processing import event_file_loader
  from tensorboard.backend.event_processing import io_wrapper
  from tensorboard.compat import tf
  from tensorboard.compat.proto import event_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: get_out_of_order(list_of_numbers) and returns: result