<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def match_envs(declared_envs, desired_envs, passthru):
 """Determine the envs that match the desired_envs. If ``passthru` is True, and none of the declared envs match the desired envs, then the desired envs will be used verbatim. :param declared_envs: The envs that are declared in the tox config. :param desired_envs: The envs desired from the tox-travis config. :param bool passthru: Whether to used the ``desired_envs`` as a fallback if no declared envs match. """

    matched = [
        declared for declared in declared_envs
        if any(env_matches(declared, desired) for desired in desired_envs)
    ]
    return desired_envs if not matched and passthru else matched