code: def create_search_method(
      args, exception_points: Optional[List[str]] = None
  ):
      if args.searcher == "asha":
          return searchers.ASHASearchMethod(
              max_trials=args.max_trials,
              max_length=args.max_length,
              divisor=args.divisor,
              num_rungs=args.num_rungs,
              exception_points=exception_points,
          )
      elif args.searcher == "random":
          return searchers.RandomSearchMethod(
              max_trials=args.max_trials,
              max_length=args.max_length,
              max_concurrent_trials=args.max_concurrent_trials,
              exception_points=exception_points,
              metric_as_dict=args.metric_as_dict,
          )
      else:
          raise ValueError("Unknown searcher type")
  
file_path: determined/e2e_tests/tests/fixtures/custom_searcher/core_api_custom_searcher.py
imports: import argparse
  import logging
  from typing import List, Optional, Tuple
  import searchers
  from urllib3 import connectionpool
  import determined
  from determined import searcher
  from determined.common import util
label_desc: Use image node_id 3 for calling a global function with example usage: create_search_method(args, exception_points) and returns: searchers, searchers