code: def create_organizations_parser(stream):
      
      import sortinghat.parsing as parsing
  
      # First, try with default parser
      for p in parsing.SORTINGHAT_ORGS_PARSERS:
          klass = parsing.SORTINGHAT_ORGS_PARSERS[p]
  
          parser = klass()
  
          if parser.check(stream):
              return parser
      raise InvalidFormatError(cause=INVALID_FORMAT_MSG)
docs: Create an organizations parser for the given stream.
  
      Factory function that creates an organizations parser for the
      given stream. The stream is only used to guess the type of the
      required parser.
  
      :param stream: stream used to guess the type of the parser
  
      :returns: an organizations parser
  
      :raise InvalidFormatError: raised when no one of the available
          parsers can parse the given stream