code: def config_clusterer(clusterer: str, **kwargs):
      """Config clusterer."""
      if clusterer == "kmeans":
          cls = TimeSeriesKMeans(**kwargs)
      elif clusterer == "kmedoids":
          cls = TimeSeriesKMedoids(**kwargs)
      return cls
  
file_path: sktime/sktime/_contrib/clustering_experiments.py
imports: import os
  import sys
  import numpy
  import sklearn.metrics
  from sklearn.metrics import davies_bouldin_score
  from sklearn.model_selection import GridSearchCV
  from sklearn.preprocessing import normalize
  import sktime.datasets.tsc_dataset_names
  from sktime.benchmarking.experiments import run_clustering_experiment
  from sktime.clustering.k_means import TimeSeriesKMeans
  from sktime.clustering.k_medoids import TimeSeriesKMedoids
  from sktime.datasets import load_from_tsfile
label_desc: Use image node_id 2 for calling a global function with example usage: config_clusterer(clusterer) and returns: cls