docs: def is_class_file(filename):
      """
      checks whether the given file is a Java class file, by opening it
      and checking for the magic header
      """
  
      with open(filename, "rb") as fd:
          c = fd.read(len(JAVA_CLASS_MAGIC))
          if isinstance(c, str):      # Python 2
              c = map(ord, c)
          return tuple(c) == JAVA_CLASS_MAGIC