'Some combinations of tool requirements need to be resolved all at once, so that Conda can select a compatible
combination of dependencies. This method returns a list of MergedCondaDependency instances (one for each requirement)
if all requirements have been successfully resolved, or an empty list if any of the requirements could not be resolved.
Parameters specific to this resolver are:
preserve_python_environment: Boolean, controls whether the python environment should be maintained during job creation for tools
that rely on galaxy being importable.
install:                     Controls if `requirements` should be installed. If `install` is True and the requirements are not installed
an attempt is made to install the requirements. If `install` is None requirements will only be installed if
`conda_auto_install` has been activated and the requirements are not yet installed. If `install` is
False will not install requirements.'

def resolve_all(self, requirements, **kwds):

    if (len(requirements) == 0):
        return []
    if (not os.path.isdir(self.conda_context.conda_prefix)):
        return []
    for requirement in requirements:
        if (requirement.type != 'package'):
            return []
    ToolRequirements = galaxy.tools.deps.requirements.ToolRequirements
    expanded_requirements = ToolRequirements([self._expand_requirement(r) for r in requirements])
    if self.versionless:
        conda_targets = [CondaTarget(r.name, version=None) for r in expanded_requirements]
    else:
        conda_targets = [CondaTarget(r.name, version=r.version) for r in expanded_requirements]
    preserve_python_environment = kwds.get('preserve_python_environment', False)
    env = self.merged_environment_name(conda_targets)
    dependencies = []
    is_installed = self.conda_context.has_env(env)
    install = kwds.get('install', None)
    if (install is None):
        install = ((not is_installed) and self.auto_install)
    elif install:
        install = (not is_installed)
    if install:
        is_installed = self.install_all(conda_targets)
    if is_installed:
        for requirement in requirements:
            dependency = MergedCondaDependency(self.conda_context, self.conda_context.env_path(env), exact=((not self.versionless) or (requirement.version is None)), name=requirement.name, version=requirement.version, preserve_python_environment=preserve_python_environment)
            dependencies.append(dependency)
    return dependencies
