docstr: Tests that event discards after restart, only affect the misordered
  tag.
  
  If a step value is observed to be lower than what was previously seen,
  this should force a discard of all previous items that are outdated, but
  only for the out of order tag. Other tags should remain unaffected.
  
  Only file versions < 2 use this out-of-order discard logic. Later versions
  discard events based on the step value of SessionLog.START.
code: def testEventsDiscardedPerTagAfterRestartForFileVersionLessThan2(
      self,
  ):
      """Tests that event discards after restart, only affect the misordered
      tag.
  
      If a step value is observed to be lower than what was previously seen,
      this should force a discard of all previous items that are outdated, but
      only for the out of order tag. Other tags should remain unaffected.
  
      Only file versions < 2 use this out-of-order discard logic. Later versions
      discard events based on the step value of SessionLog.START.
      """
      warnings = []
      self.stubs.Set(logger, "warning", warnings.append)
  
      gen = _EventGenerator(self)
      acc = ea.EventAccumulator(gen)
  
      gen.AddEvent(
          event_pb2.Event(
              wall_time=0, step=0, file_version="brain.Event:1"
          )
      )
      gen.AddScalar("s1", wall_time=1, step=100, value=20)
      gen.AddScalar("s1", wall_time=1, step=200, value=20)
      gen.AddScalar("s1", wall_time=1, step=300, value=20)
      gen.AddScalar("s1", wall_time=1, step=101, value=20)
      gen.AddScalar("s1", wall_time=1, step=201, value=20)
      gen.AddScalar("s1", wall_time=1, step=301, value=20)
  
      gen.AddScalar("s2", wall_time=1, step=101, value=20)
      gen.AddScalar("s2", wall_time=1, step=201, value=20)
      gen.AddScalar("s2", wall_time=1, step=301, value=20)
  
      acc.Reload()
      ## Check that we have discarded 200 and 300
      self.assertEqual(
          [x.step for x in acc.Scalars("s1")], [100, 101, 201, 301]
      )
  
      ## Check that s1 discards do not affect s2
      ## i.e. check that only events from the out of order tag are discarded
      self.assertEqual(
          [x.step for x in acc.Scalars("s2")], [101, 201, 301]
      )
  
imports: import os
  import numpy
  import tensorflow
  from tensorboard.backend.event_processing import event_accumulator
  from tensorboard.compat.proto import config_pb2
  from tensorboard.compat.proto import event_pb2
  from tensorboard.compat.proto import graph_pb2
  from tensorboard.compat.proto import meta_graph_pb2
  from tensorboard.compat.proto import summary_pb2
  from tensorboard.plugins.distribution import compressor
  from tensorboard.util import tensor_util
  from tensorboard.util import test_util
  from tensorboard.util import tb_logging
label_desc: Use image node_id 15 for calling the MockingEventAccumulatorTest obj's underlying member method code with example usage: obj.testEventsDiscardedPerTagAfterRestartForFileVersionLessThan2() without return types