code: def initfp(self, file):
      self._file = file
      self._soundpos = 0
      magic = int(_read_u32(file))
      if magic != AUDIO_FILE_MAGIC:
          raise Error("bad magic number")
      self._hdr_size = int(_read_u32(file))
      if self._hdr_size < 24:
          raise Error("header size too small")
      if self._hdr_size > 100:
          raise Error("header size ridiculously large")
      self._data_size = _read_u32(file)
      if self._data_size != AUDIO_UNKNOWN_SIZE:
          self._data_size = int(self._data_size)
      self._encoding = int(_read_u32(file))
      if self._encoding not in _simple_encodings:
          raise Error("encoding not (yet) supported")
      if self._encoding in (
          AUDIO_FILE_ENCODING_MULAW_8,
          AUDIO_FILE_ENCODING_ALAW_8,
      ):
          self._sampwidth = 2
          self._framesize = 1
      elif self._encoding == AUDIO_FILE_ENCODING_LINEAR_8:
          self._framesize = self._sampwidth = 1
      elif self._encoding == AUDIO_FILE_ENCODING_LINEAR_16:
          self._framesize = self._sampwidth = 2
      elif self._encoding == AUDIO_FILE_ENCODING_LINEAR_24:
          self._framesize = self._sampwidth = 3
      elif self._encoding == AUDIO_FILE_ENCODING_LINEAR_32:
          self._framesize = self._sampwidth = 4
      else:
          raise Error("unknown encoding")
      self._framerate = int(_read_u32(file))
      self._nchannels = int(_read_u32(file))
      if not self._nchannels:
          raise Error("bad # of channels")
      self._framesize = self._framesize * self._nchannels
      if self._hdr_size > 24:
          self._info = file.read(self._hdr_size - 24)
          self._info, _, _ = self._info.partition(b"\0")
      else:
          self._info = b""
      try:
          self._data_pos = file.tell()
      except (AttributeError, OSError):
          self._data_pos = None
  
imports: from collections import namedtuple
  import warnings
label_desc: Use image node_id 5 for calling the Au_read obj's underlying member method code with example usage: obj.initfp(file) without return types