def METHOD_NAME(keys_to_delete: List[Tuple[Container, Key]]):
    """Removes the indicated keys/indexes from their paired containers."""
    list_items_to_delete = []
    for container, key in keys_to_delete:
        if isinstance(container, list):
            # If it's a list, we want to gather up the items to remove from the list.
            # We don't want to modify the list length yet, since removals will change all the other
            # list indexes. Instead, we'll get the actual items at those indexes to remove later.
            list_items_to_delete.append((container, container[key]))
        else:
            del container[key]
    # Finally, now that we have all the items we want to remove the lists, we'll remove those
    # items specifically from the lists.
    for containing_list, item in list_items_to_delete:
        containing_list.remove(item)