docs: def has_bom(self, f):
          """Check for UTF8, UTF16, and UTF32 BOMs."""
  
          content = f.read(4)
          encoding = None
          m = RE_UTF_BOM.match(content)
          if m is not None:
              if m.group(1):
                  encoding = 'utf-8-sig'
              elif m.group(2):
                  encoding = 'utf-32'
              elif m.group(3):
                  encoding = 'utf-32'
              elif m.group(4):
                  encoding = 'utf-16'
              elif m.group(5):
                  encoding = 'utf-16'
          return encoding