code: def test_out_of_order_steps(self) -> None:
      logger = StdoutLogger(precision=2)
      with captured_output() as (out, _):
          logger.log(step=-1, name="metric_1", data=1.1234)
          out = cast(StringIO, out)
          self.assertTrue(
              out.getvalue() == "\n[Step -1] metric_1=1.12",
              msg=repr(f"Actual output: {out.getvalue()}"),
          )
  
          logger.log(step=10, name="metric_1", data=1.234)
          self.assertTrue(
              out.getvalue()
              == "\n[Step -1] metric_1=1.12\n[Step 10] metric_1=1.23",
              msg=repr(f"Actual output: {out.getvalue()}"),
          )
  
          logger.log_dict(
              step=2, payload={"metric_2": 2.1234, "metric_3": 3.987}
          )
          self.assertTrue(
              out.getvalue()
              == "\n[Step -1] metric_1=1.12\n[Step 10] metric_1=1.23\n[Step 2] metric_2=2.12 metric_3=3.99",
              msg=repr(f"Actual output: {out.getvalue()}"),
          )
  
file_path: tnt/tests/utils/loggers/test_stdout.py
imports: import unittest
  from io import StringIO
  from typing import cast
  from torchtnt.utils.loggers.stdout import StdoutLogger
  from torchtnt.utils.test_utils import captured_output
label_desc: Use image node_id 3 for calling the StdoutLoggerTest obj's underlying member method code with example usage: obj.test_out_of_order_steps() without return types