def METHOD_NAME(manifest_contents) -> dict:
    """
    Parses the contents of the manifest file using a regex and then stores the
    output of the matches in a dictionary using the project name as the key and
    the returned revision as the value.
    :param manifest_contents: Raw contents of the manifest file.
    :type manifest_contents: str
    :return: Dictionary containing project name and revision as key, values.
    :rtype: dict
    """
    project_body_pattern = r"projects:([\s\S]*)self:"
    body_match = re.findall(project_body_pattern, manifest_contents, re.M)
    if body_match is []:
        print("Could not identify project field of manifest.")
        sys.exit(255)
    body = body_match[0]
    regex_pattern = r"- name:[ ]*([^ \n]*)[\s\S]*?revision:[ ]*([a-z,0-9,\.]*)"
    matches = re.findall(regex_pattern, body, re.M)
    revisions = {}
    for revision_pair in matches:
        if revision_pair is not None and len(revision_pair) == 2:
            revisions[revision_pair[0]] = revision_pair[1]
    return revisions