docstr: Return read structure with given or guessed endiancode
  
  Parameters
  ----------
  fileobj : file-like object
     Needs to implement ``read`` method
  endianness : None or endian code, optional
     Code specifying endianness of read data
  
  Returns
  -------
  wstr : WrapStruct object
     WrapStruct object initialized from data in fileobj
docstr_tok: ["Return","read","structure","with","given","or","guessed","endiancode","Parameters","--","--","--","--","--","fileobj",":","file-like","object","Needs","to","implement","``","read","``","method","endianness",":","None","or","endian","code",",","optional","Code","specifying","endianness","of","read","data","Returns","--","--","--","-","wstr",":","WrapStruct","object","WrapStruct","object","initialized","from","data","in","fileobj"]
code: def from_fileobj(klass, fileobj, endianness=None, check=True):
      """Return read structure with given or guessed endiancode
  
      Parameters
      ----------
      fileobj : file-like object
         Needs to implement ``read`` method
      endianness : None or endian code, optional
         Code specifying endianness of read data
  
      Returns
      -------
      wstr : WrapStruct object
         WrapStruct object initialized from data in fileobj
      """
      raw_str = fileobj.read(klass.template_dtype.itemsize)
      return klass(raw_str, endianness, check)
  
imports: from __future__ import annotations
  import numpy
  from .None import imageglobals
  from .batteryrunners import BatteryRunner
  from .volumeutils import Recoder, endian_codes, native_code, pretty_mapping, swapped_code
label_desc: Use image node_id 2 for calling the WrapStruct obj's underlying member method code with example usage: obj.from_fileobj(klass, fileobj, endianness, check) and returns: klass