code: def autodetect_format(content):
      
      formats = set()
      for impl in FORMAT_IDENTIFIER_TO_FORMAT_CLASS.values():
          guess = impl.guess_format(content)
          if guess is not None:
              formats.add(guess)
  
      if len(formats) == 1:
          return formats.pop()
      elif not formats:
          raise FormatAutodetectionError("No suitable formats")
      else:
          raise FormatAutodetectionError("Multiple suitable formats (%r)" % formats)
docs: Return format identifier for given fragment or raise FormatAutodetectionError.