from typing import Tuple


def summarize_location(location: Tuple[str, str, str, str, str, str]) -> Tuple[str, str, str]:
    """ Get manuscript location and summarize for usage in citavi

    Args:
        location (tuple): metadata of manuscript's location

    Returns:
        tuple: summary of metadata of manuscript's location
    """

    location_list = list(location)
    for i in range(len(location_list)):
        if not location_list[i]:
            location_list[i] = ""
            continue
        location_list[i] = location_list[i] + ", "
    try:
        settlement = location_list[1] + location_list[0]
        settlement = settlement[:-2]

    except:
        settlement = "unknown"

    try:
        archive = location_list[2] + location_list[3] + location_list[4]
        archive = archive[:-2]
    except:
        archive = "unknown"

    signature = location_list[5]
    signature = signature[:-2]

    return settlement, archive, signature