docstr: Write raw table data to disk.
code: def __setitem__(self, tag, data):
      """Write raw table data to disk."""
      if tag in self.tables:
          raise TTLibError("cannot rewrite '%s' table" % tag)
  
      entry = self.DirectoryEntry()
      entry.tag = tag
      entry.offset = self.nextTableOffset
      if tag == "head":
          entry.checkSum = calcChecksum(
              data[:8] + b"\0\0\0\0" + data[12:]
          )
          self.headTable = data
          entry.uncompressed = True
      else:
          entry.checkSum = calcChecksum(data)
      entry.saveData(self.file, data)
  
      if self.flavor == "woff":
          entry.origOffset = self.origNextTableOffset
          self.origNextTableOffset += (entry.origLength + 3) & ~3
  
      self.nextTableOffset = self.nextTableOffset + (
          (entry.length + 3) & ~3
      )
      # Add NUL bytes to pad the table data to a 4-byte boundary.
      # Don't depend on f.seek() as we need to add the padding even if no
      # subsequent write follows (seek is lazy), ie. after the final table
      # in the font.
      self.file.write(b"\0" * (self.nextTableOffset - self.file.tell()))
      assert self.nextTableOffset == self.file.tell()
  
      self.setEntry(tag, entry)
  
imports: from io import BytesIO
  from types import SimpleNamespace
  from fontTools.misc.textTools import Tag
  from fontTools.misc import sstruct
  from fontTools.ttLib import TTLibError, TTLibFileIsCollectionError
  import struct
  from collections import OrderedDict
  import logging
label_desc: Use image node_id 4 for calling the SFNTWriter obj's underlying member method code with example usage: obj.__setitem__(tag, data) without return types