def is_track_in_tracks(song_uri, tracks):
    """
    Checks whether song is within a list of songs
    :param song_uri: ID of target song
    :param tracks: Page object of track or playlist track objects
    :return: Whether or a not a song is within a list of tracks
    """
    for track in tracks['items']:
        try:
            # If playlist track it contains the track object within the key 'track'
            if song_uri == track['track']['uri']:
                return True
        except KeyError:
            if song_uri == track['uri']:
                return True
    return False