def METHOD_NAME(element_html, data):
    element = lxml.html.fragment_fromstring(element_html)
    file_name = pl.get_string_attrib(element, "file-name", "")
    answer_name = get_answer_name(file_name)
    # Get submitted answer or return parse_error if it does not exist
    file_contents = data["submitted_answers"].get(answer_name, None)
    if not file_contents:
        add_format_error(data, "No submitted answer for {0}".format(file_name))
        return
    # We will store the files in the submitted_answer["_files"] key,
    # so delete the original submitted answer format to avoid
    # duplication
    del data["submitted_answers"][answer_name]
    if data["submitted_answers"].get("_files", None) is None:
        data["submitted_answers"]["_files"] = []
        data["submitted_answers"]["_files"].append(
            {"name": file_name, "contents": file_contents}
        )
    elif isinstance(data["submitted_answers"].get("_files", None), list):
        data["submitted_answers"]["_files"].append(
            {"name": file_name, "contents": file_contents}
        )
    else:
        add_format_error(data, "_files was present but was not an array.")