code: def set_aligned_params(
      new_params, existing_params, n_models, param_names=PARAM_NAMES
  ):
      for param in param_names:
          if param in new_params:
              if isinstance(existing_params[param], list):
                  existing_params[param].append(new_params[param])
              elif isinstance(existing_params[param], tuple):
                  existing_params[param] = existing_params[param] + (
                      new_params[param],
                  )
              elif isinstance(existing_params[param], np.ndarray):
                  existing_params[param] = np.append(
                      existing_params[param], new_params[param]
                  )
              else:
                  if new_params[param] != existing_params[param]:
                      existing_params[param] = (
                          existing_params[param],
                      ) * n_models + (new_params[param],)
  
      return existing_params
  
imports: import numpy
  import numba
  from sklearn.base import BaseEstimator
  from sklearn.utils import check_array
  from umap.sparse import arr_intersect
  from umap.sparse import arr_union
  from umap.umap_ import UMAP, make_epochs_per_sample
  from umap.spectral import spectral_layout
  from umap.layouts import optimize_layout_aligned_euclidean
label_desc: Use image node_id 7 for calling a global function with example usage: set_aligned_params(new_params, existing_params, n_models, param_names) and returns: existing_params