code: def test_one_hot(self):
      expected = torch.tensor([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]])
      actual = _one_hot(torch.tensor([0, 1]), 3)
      assert torch.all(torch.eq(expected, actual))
  
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 1 for calling the TestLM obj's underlying member method code with example usage: obj.test_one_hot() without return types