code: def _check_evaluate_args(
      completed_trials: List[FrozenTrial], params: Optional[List[str]]
  ) -> None:
      if len(completed_trials) == 0:
          raise ValueError(
              "Cannot evaluate parameter importances without completed trials."
          )
      if len(completed_trials) == 1:
          raise ValueError(
              "Cannot evaluate parameter importances with only a single trial."
          )
  
      if params is not None:
          if not isinstance(params, (list, tuple)):
              raise TypeError(
                  "Parameters must be specified as a list. Actual parameters: {}.".format(
                      params
                  )
              )
          if any(not isinstance(p, str) for p in params):
              raise TypeError(
                  "Parameters must be specified by their names with strings. Actual parameters: "
                  "{}.".format(params)
              )
  
          if len(params) > 0:
              at_least_one_trial = False
              for trial in completed_trials:
                  if all(p in trial.distributions for p in params):
                      at_least_one_trial = True
                      break
              if not at_least_one_trial:
                  raise ValueError(
                      "Study must contain completed trials with all specified parameters. "
                      "Specified parameters: {}.".format(params)
                  )
  
imports: import abc
  from typing import Callable
  from typing import cast
  from typing import Collection
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Union
  import numpy
  from optuna._transform import _SearchSpaceTransform
  from optuna.distributions import BaseDistribution
  from optuna.search_space import intersection_search_space
  from optuna.study import Study
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
label_desc: Use image node_id 2 for calling a global function with example usage: _check_evaluate_args(completed_trials, params) without return types