def extract_header_comment_key_value_tuples_from_file(file_descriptor):
    file_data = file_descriptor.read()
    findall_result = re.findall(HEADER_COMMENT_KEY_VALUE_TUPLES_REGEX, file_data, re.MULTILINE | re.DOTALL)

    returned_list = []
    for header_comment, _ignored, raw_comments, key, value in findall_result:
        comments = re.findall("/\* (.*?) \*/", raw_comments)
        if len(comments) == 0:
            comments = [u""]
        returned_list.append((header_comment, comments, key, value))

    return returned_list
Extracts tuples representing comments and localization entries from strings file.
dataset/ETHPy150Open joytunes/JTLocalize/localization_flow/jtlocalize/core/localization_utils.py/extract_header_comment_key_value_tuples_from_file