def METHOD_NAME(videoid, metadata):
    """Determine the next episode and get the videoid"""
    try:
        videoid_next_episode = _find_next_episode(videoid, metadata)
        LOG.debug('Next episode is {}', videoid_next_episode)
        return videoid_next_episode
    except (TypeError, KeyError):
        # import traceback
        # LOG.debug(traceback.format_exc())
        LOG.debug('There is no next episode, not setting up Up Next')
        return None