<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def repo_in_defined_envs(repo, all_envs):
 """Raises exception if the repo references undefined environments"""

    remaining_envs = set(repo['env']) - set(all_envs)
    if set(repo['env']) - set(all_envs):
        raise JuicerRepoInUndefinedEnvs("Repo def %s references undefined environments: %s" %
                                        (repo['name'], ", ".join(list(remaining_envs))))
    else:
        return True