def difference_in_size_to_last_partition(partition, partitions):
    """
    Return the difference in size between the specified Partition and the last Partition in the provided list. If the list is
    empty, return infinity.

    :params partition: a Partition object to use for calculating the difference
    :params partitions: a list of Partition objects
    :returns: The difference in size between partition and the last Partition in the partitions list, or infinity
    """
    if len(partitions) == 0:
        return float("inf")
    return abs(partition.size - partitions[-1].size)