code: def test_modes(self):
      history = trax_history.History()
      history.append("train", "metric1", 1, 0.1)
      history.append("test", "metric2", 2, 0.2)
      self.assertEqual(history.modes, ["test", "train"])
  
file_path: trax/trax/supervised/history_test.py
imports: from absl.testing import absltest
  from trax.supervised import history
label_desc: Use image node_id 4 for calling the HistoryTest obj's underlying member method code with example usage: obj.test_modes() without return types