import shelve


def load_update_stamps(field, sheet_name):
    """Load last issues/PRs update timestamps from the file.

    Args:
        field (str): PRs or issues updates should be loaded.
        sheet_name (str): Name of the sheet.

    Returns:
        dict:
            Index of the last issues/PRs update timestamps
            for every repo on this sheet.
    """
    with shelve.open("last_updates", "c") as lasts_file:
        return lasts_file.setdefault(field, {}).get(sheet_name, {})