def trim_item(item):
    """Trims unnecessary fields in the track item"""
    track = item['track']
    if 'album' in track:
        to_delete = ['album_type', 'available_markets', 'external_urls', 'href',
                     'images', 'uri']
        for key in to_delete:
            try:
                del track['album'][key]
            except KeyError:
                pass
    to_delete = ['available_markets', 'external_ids', 'external_urls', 'href',
                 'is_local', 'preview_url', 'uri']
    for key in to_delete:
        try:
            del track[key]
        except KeyError:
            pass
    return item