def METHOD_NAME(self):
    """
    Returns a scheduled item ends that is based on the current show
    instance.
    End of a specific item can potentially overrun the show that it is
    scheduled in. In that case, the end should be the end of the show.
    This prevents the next show having overlapping items playing.
    Cases:
    - When the schedule ends before the end of the show instance,
    return the scheduled item ends.
    - When the schedule starts before the end of the show instance
    and ends after the show instance ends,
    return the show instance ends.
    - When the schedule starts after the end of the show instance,
    return the show instance ends.
    """
    if self.instance.ends_at < self.ends_at:
        return self.instance.ends_at
    return self.ends_at