code: def assertType1(data):
      for head in [b"%!PS-AdobeFont", b"%!FontType1"]:
          if data[: len(head)] == head:
              break
      else:
          raise T1Error("not a PostScript font")
      if not _fontType1RE.search(data):
          raise T1Error("not a Type 1 font")
      if data.find(b"currentfile eexec") < 0:
          raise T1Error("not an encrypted Type 1 font")
      # XXX what else?
      return data
  
imports: import fontTools
  from fontTools.misc import eexec
  from fontTools.misc.macCreatorType import getMacCreatorAndType
  from fontTools.misc.textTools import bytechr, byteord, bytesjoin, tobytes
  from fontTools.misc.psOperators import _type1_pre_eexec_order, _type1_fontinfo_order, _type1_post_eexec_order
  from fontTools.encodings.StandardEncoding import StandardEncoding
  import os
  import re
label_desc: Use image node_id 13 for calling a global function with example usage: assertType1(data) and returns: data