code: def get_resource_manager(
      resource,
      connector,
      n_parallel,
      auppath=DEFAULT_AUPTIMIZER_PATH,
      **kwargs,
  ):
      """
      Get resource manager for a specific resource type
  
      :param resource: gpu or cpu type resource
      :type resource: str
      :param connector: database connector
      :type connector: AbstractConnector
      :param n_parallel: how many parallel jobs to be run
      :type n_parallel: int
      :param auppath: aup environment folder
      :type auppath: str
      :return: resource manager
      :rtype: AbstractResourceManager
      """
      try:
          resource = _SupportResource[resource]
      except KeyError:
          raise KeyError("%s not implemented" % resource)
  
      mod = importlib.import_module(".%s" % resource, "aup.EE.Resource")
      return mod.__dict__[resource](
          connector, n_parallel, auppath=auppath, **kwargs
      )
  
imports: import abc
  import copy
  import importlib
  import logging
  import random
  import threading
  import time
  import numpy
  import math
  import warnings
  from ...utils import DEFAULT_AUPTIMIZER_PATH
  from .utils.curve_fitting import CurveModel
label_desc: Use image node_id 1 for calling a global function with example usage: get_resource_manager(resource, connector, n_parallel, auppath) and returns: mod