code: def get_model(model_name):
      print(f"getting model {model_name}")
      model_class = MODELS.get(model_name)
      if not model_class:
          raise ValueError(f"Unknown Model '{model_name}'")
  
      # some default params
      if model_name.endswith("als"):
          params = {"factors": 128, "dtype": np.float32}
      elif model_name == "bm25":
          params = {"K1": 100, "B": 0.5}
      elif model_name == "bpr":
          params = {"factors": 63}
      elif model_name == "lmf":
          params = {
              "factors": 30,
              "iterations": 40,
              "regularization": 1.5,
          }
      else:
          params = {}
  
      return model_class(**params)
  
file_path: implicit/examples/lastfm.py
imports: import argparse
  import codecs
  import logging
  import time
  import numpy
  import tqdm
  from implicit.als import AlternatingLeastSquares
  from implicit.approximate_als import AnnoyAlternatingLeastSquares, FaissAlternatingLeastSquares, NMSLibAlternatingLeastSquares
  from implicit.bpr import BayesianPersonalizedRanking
  from implicit.datasets.lastfm import get_lastfm
  from implicit.lmf import LogisticMatrixFactorization
  from implicit.nearest_neighbours import BM25Recommender, CosineRecommender, TFIDFRecommender, bm25_weight
label_desc: Use image node_id 1 for calling a global function with example usage: get_model(model_name) and returns: model_class