code: def model_selection(params: dict, args: Namespace):
      from src.logger import logger
  
      logger.info(
          f"begin run model_selection on UDF runtime with CPU only"
      )
  
      mini_batch_data = json.loads(params["mini_batch"])
      budget = float(params["budget"])
  
      from src.eva_engine.run_ms import RunModelSelection
  
      dataloader = generate_dataloader(
          mini_batch_data=mini_batch_data, args=args
      )
  
      data_loader = [dataloader, dataloader, dataloader]
  
      rms = RunModelSelection(
          args.search_space, args, is_simulate=args.is_simulate
      )
      (
          best_arch,
          best_arch_performance,
          time_usage,
          _,
          p1_trace_highest_score,
          p1_trace_highest_scored_models_id,
      ) = rms.select_model_online_clean(
          budget=budget,
          data_loader=data_loader,
          only_phase1=False,
          run_workers=1,
      )
  
      return orjson.dumps(
          {
              "best_arch": best_arch,
              "best_arch_performance": best_arch_performance,
              "time_usage": time_usage,
          }
      ).decode("utf-8")
  
imports: import calendar
  import os
  import time
  import requests
  import json
  from typing import List, Dict
  import traceback
  import orjson
  from argparse import Namespace
  from shared_config import parse_config_arguments
  from torch.utils.data import Dataset
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: model_selection(params, args) and returns: orjson