code: def test_text_history_init(self):
      text = "Hello there!"
      tokens = torch.tensor([1, 2, 3])
  
      history = TextHistory(text, tokens)
      self.assertEqual(history.text, text)
      self.assertTrue(torch.equal(history.tokens, tokens))
      self.assertTrue(
          torch.equal(history.token_masks, torch.zeros_like(tokens))
      )
  
      history = TextHistory(text, tokens, system=False)
      self.assertTrue(
          torch.equal(history.token_masks, torch.ones_like(tokens))
      )
  
imports: import unittest
  from unittest.mock import patch
  import torch
  from transformers import AutoTokenizer
  from trl import AutoModelForCausalLMWithValueHead, TextEnvironment, TextHistory
label_desc: Use image node_id 1 for calling the TextHistoryTest obj's underlying member method code with example usage: obj.test_text_history_init() without return types