def filter_ending(registration_number: str, items: list):
    """
    Get a subset of the provided list that excludes items that were not removed for the specified registration number
    :param registration_number: The registration number to filter out items for
    :param items: A list of items to be filtered.  Must have a 'ending_registration_number' attribute
    :return: The filtered list
    """
    return list(filter(lambda item: item.ending_registration_number != registration_number, items))