class_docstr: Convenience class to encapsulate TRK file format.
  
  Notes
  -----
  TrackVis (so its file format: TRK) considers the streamline coordinate
  (0,0,0) to be in the corner of the voxel whereas NiBabel's streamlines
  internal representation (Voxel space) assumes (0,0,0) to be in the
  center of the voxel.
  
  Thus, streamlines are shifted by half a voxel on load and are shifted
  back on save.
docstr: Check if the file is in TRK format.
  
  Parameters
  ----------
  fileobj : string or file-like object
      If string, a filename; otherwise an open file-like object
      pointing to TRK file (and ready to read from the beginning
      of the TRK header data). Note that calling this function
      does not change the file position.
  
  Returns
  -------
  is_correct_format : {True, False}
      Returns True if `fileobj` is compatible with TRK format,
      otherwise returns False.
docstr_tok: ["Check","if","the","file","is","in","TRK","format",".","Parameters","--","--","--","--","--","fileobj",":","string","or","file-like","object","If","string",",","a","filename",";","otherwise","an","open","file-like","object","pointing","to","TRK","file","(","and","ready","to","read","from","the","beginning","of","the","TRK","header","data",")",".","Note","that","calling","this","function","does","not","change","the","file","position",".","Returns","--","--","--","-","is_correct_format",":","{","True",",","False","}","Returns","True","if","`","fileobj","`","is","compatible","with","TRK","format",",","otherwise","returns","False","."]
code: def is_correct_format(cls, fileobj):
      """Check if the file is in TRK format.
  
      Parameters
      ----------
      fileobj : string or file-like object
          If string, a filename; otherwise an open file-like object
          pointing to TRK file (and ready to read from the beginning
          of the TRK header data). Note that calling this function
          does not change the file position.
  
      Returns
      -------
      is_correct_format : {True, False}
          Returns True if `fileobj` is compatible with TRK format,
          otherwise returns False.
      """
      with Opener(fileobj) as f:
          magic_len = len(cls.MAGIC_NUMBER)
          magic_number = f.read(magic_len)
          f.seek(-magic_len, os.SEEK_CUR)
          return magic_number == cls.MAGIC_NUMBER
  
imports: import os
  import string
  import struct
  import warnings
  import numpy
  import nibabel
  from nibabel.openers import Opener
  from nibabel.orientations import aff2axcodes, axcodes2ornt
  from nibabel.volumeutils import endian_codes, native_code, swapped_code
  from .array_sequence import create_arraysequences_from_generator
  from .header import Field
  from .tractogram import LazyTractogram, Tractogram, TractogramItem
  from .tractogram_file import DataError, HeaderError, HeaderWarning, TractogramFile
  from .utils import peek_next
label_desc: Use image node_id 2 for calling the TrkFile obj's underlying member method code with example usage: obj.is_correct_format(cls, fileobj) and returns: unknown