code: def _resolve_environments(
      mlops_connection, project, environment_names
  ):
      all_environments = mlops_connection.storage.deployment_environment.list_deployment_environments(
          h2o_mlops_client.StorageListDeploymentEnvironmentsRequest(
              project.id
          )
      )
      environments = []
      for environment_name in environment_names:
          environment = None
          for candidate in all_environments.deployment_environment:
              if candidate.display_name == environment_name:
                  environment = candidate
                  break
          if environment:
              environments.append(environment)
          else:
              warnings.warn(
                  "Environment '%s' does not exist." % environment
              )
  
      return environments
  
imports: import h2o_cloud_extensions
  import h2o_mlops_client
  import time
  import h2o
  from .status import _is_model_deployed, _is_model_published
  from .connect import *
  from .utils import *
label_desc: Use image node_id 6 for calling a global function with example usage: _resolve_environments(mlops_connection, project, environment_names) and returns: environments