code: def test_generate(self):
      lm = ecco.from_pretrained(
          "sshleifer/tiny-gpt2", activations=True, verbose=False
      )
      output = lm.generate(
          "test", generate=1, attribution=["grad_x_input"]
      )
  
      assert output.token_ids.shape == (
          1,
          2,
      ), "Generated one token successfully"
      assert (
          output.attribution["grad_x_input"][0] == 1
      ), "Successfully got an attribution value"
      # Confirm activations is dimensions:
      # (batch 1, layer 2, h_dimension 8, position 1)
      assert output.activations["decoder"].shape == (1, 2, 8, 1)
  
file_path: ecco/tests/lm_test.py
imports: from ecco.lm import LM, _one_hot, sample_output_token, activations_dict_to_array
  import ecco
  import torch
  import numpy
  from transformers import PreTrainedModel
label_desc: Use image node_id 6 for calling the TestLM obj's underlying member method code with example usage: obj.test_generate() without return types