code: def test_load_trk_version_1(self):
      # Simulate and test a TRK (version 1).
      # First check that setting the RAS affine works in version 2.
      trk_struct, trk_bytes = self.trk_with_bytes()
      trk_struct[Field.VOXEL_TO_RASMM] = np.diag([2, 3, 4, 1])
      trk = TrkFile.load(BytesIO(trk_bytes))
      assert_array_equal(trk.affine, np.diag([2, 3, 4, 1]))
      # Next check that affine assumed identity if version 1.
      trk_struct["version"] = 1
      with pytest.warns(HeaderWarning, match="identity"):
          trk = TrkFile.load(BytesIO(trk_bytes))
      assert_array_equal(trk.affine, np.eye(4))
      assert_array_equal(trk.header["version"], 1)
  
imports: import copy
  import os
  import sys
  import unittest
  from io import BytesIO
  from os.path import join
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ...testing import assert_arr_dict_equal, clear_and_catch_warnings, data_path, error_warnings
  from ..None import trk
  from ..header import Field
  from ..tractogram import Tractogram
  from ..tractogram_file import HeaderError, HeaderWarning
  from ..trk import TrkFile, decode_value_from_name, encode_value_in_name, get_affine_trackvis_to_rasmm
  from .test_tractogram import assert_tractogram_equal
label_desc: Use image node_id 6 for calling the TestTRK obj's underlying member method code with example usage: obj.test_load_trk_version_1() without return types