def find_episode(episode_id, seasons):
    """
    Return metadata for a specific episode from within a nested
    metadata dict.
    Returns an empty dict if the episode could not be found.
    """
    for season in seasons:
        for episode in season['episodes']:
            if str(episode['id']) == episode_id:
                return episode
    return {}