code: def _parallelize_joblib(fun, iter, meta, backend, backend_params):
      """Parallelize loop via joblib Parallel."""
      from joblib import Parallel, delayed
  
      par_params = backend_params.copy()
      if "backend" not in par_params:
          # if user selects custom joblib backend but does not specify backend explicitly,
          # raise a ValueError
          if backend == "joblib":
              raise ValueError(
                  '"joblib" was selected as first layer parallelization backend, '
                  "but no backend string was "
                  'passed in the backend parameters dict, e.g., "spark". '
                  "Please specify a backend to joblib as a key-value pair "
                  "in the backend_params arg or the backend:parallel:params config "
                  'when using "joblib". '
                  'For clarity, "joblib" should only be used for two-layer '
                  "backend dispatch, where the first layer is joblib, "
                  "and the second layer is a custom backend of joblib, e.g., spark. "
                  "For first-party joblib backends, please use the backend string "
                  'of sktime directly, e.g., by specifying "multiprocessing" or "loky".'
              )
          # in all other cases, we ensure the backend parameter is one of
          # "loky", "multiprocessing" or "threading", as passed via backend
          else:
              par_params["backend"] = backend
      elif backend != "joblib":
          par_params["backend"] = backend
  
      if "n_jobs" not in par_params:
          par_params["n_jobs"] = -1
  
      ret = Parallel(**par_params)(
          delayed(fun)(x, meta=meta) for x in iter
      )
      return ret
  
label_desc: Use image node_id 3 for calling a global function with example usage: _parallelize_joblib(fun, iter, meta, backend, backend_params) and returns: ret