code: def _write_header(self):
      if self._comptype == "NONE":
          if self._sampwidth == 1:
              encoding = AUDIO_FILE_ENCODING_LINEAR_8
              self._framesize = 1
          elif self._sampwidth == 2:
              encoding = AUDIO_FILE_ENCODING_LINEAR_16
              self._framesize = 2
          elif self._sampwidth == 3:
              encoding = AUDIO_FILE_ENCODING_LINEAR_24
              self._framesize = 3
          elif self._sampwidth == 4:
              encoding = AUDIO_FILE_ENCODING_LINEAR_32
              self._framesize = 4
          else:
              raise Error("internal error")
      elif self._comptype == "ULAW":
          encoding = AUDIO_FILE_ENCODING_MULAW_8
          self._framesize = 1
      else:
          raise Error("internal error")
      self._framesize = self._framesize * self._nchannels
      _write_u32(self._file, AUDIO_FILE_MAGIC)
      header_size = 25 + len(self._info)
      header_size = (header_size + 7) & ~7
      _write_u32(self._file, header_size)
      if self._nframes == AUDIO_UNKNOWN_SIZE:
          length = AUDIO_UNKNOWN_SIZE
      else:
          length = self._nframes * self._framesize
      try:
          self._form_length_pos = self._file.tell()
      except (AttributeError, OSError):
          self._form_length_pos = None
      _write_u32(self._file, length)
      self._datalength = length
      _write_u32(self._file, encoding)
      _write_u32(self._file, self._framerate)
      _write_u32(self._file, self._nchannels)
      self._file.write(self._info)
      self._file.write(b"\0" * (header_size - len(self._info) - 24))
  
imports: from collections import namedtuple
  import warnings
label_desc: Use image node_id 24 for calling the Au_write obj's underlying member method code with example usage: obj._write_header() without return types