class_docstr: Basic tests on the util functions in TorchAgent.
class_docstr_tok: ["Basic","tests","on","the","util","functions","in","TorchAgent","."]
code: def test_reversed_history(self):
      agent = get_agent(history_reversed=True)
      agent.history.reset()
      agent.history.update_history({"text": "hello i am stephen"})
      agent.history.update_history({"text": "i am bob"})
      assert (
          agent.history.get_history_str()
          == "hello i am stephen\ni am bob"
      )
      agent.history.reset()
      agent.history.update_history(
          {"text": "your persona: filler\nhello i am stephen"}
      )
      agent.history.update_history({"text": "i am bob"})
      assert (
          agent.history.get_history_str()
          == "your persona: filler\nhello i am stephen\ni am bob"
      )
  
imports: import os
  import unittest
  from parlai.core.agents import create_agent_from_shared
  from parlai.utils.testing import tempdir
  from parlai.utils.misc import Message
label_desc: Use image node_id 10 for calling the TestTorchAgent obj's underlying member method code with example usage: obj.test_reversed_history() without return types