code: def coordinator(params: dict, args: Namespace):
      from src.logger import logger
  
      logger.info(f"begin run coordinator")
      # print (f"begin run coordinator")
  
      budget = float(params["budget"])
      score_time_per_model = float(params["score_time_per_model"])
      train_time_per_epoch = float(params["train_time_per_epoch"])
      only_phase1 = (
          True if params["only_phase1"].lower() == "true" else False
      )
  
      from src.eva_engine.run_ms import RunModelSelection
  
      logger.info(
          f"coordinator params: budget={budget}, "
          f"score_time_per_model={score_time_per_model}, "
          f"train_time_per_epoch={train_time_per_epoch}, "
          f"only_phase1={only_phase1}"
      )
  
      rms = RunModelSelection(
          args.search_space, args, is_simulate=args.is_simulate
      )
      K, U, N = rms.coordination(
          budget=budget,
          score_time_per_model=score_time_per_model,
          train_time_per_epoch=train_time_per_epoch,
          only_phase1=only_phase1,
      )
  
      return orjson.dumps({"k": K, "u": U, "n": N}).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 6 for calling a global function with example usage: coordinator(params, args) and returns: orjson