class_docstr: Create Resource to run jobs.
  
  :param connector: Connector to database
  :type connector: AbstractConnector
docstr: method to get the available resource to run a job
  
  :param username: username for job running
  :type username: str
  :param rtype: resource type
  :type rtype: str
  :param rid_blacklist: resource ids to ignore
  :type rid_blacklist: [int]
  :return: a random selection of all available resource IDs
  :rtype: int
docstr_tok: ["method","to","get","the","available","resource","to","run","a","job",":","param","username",":","username","for","job","running",":","type","username",":","str",":","param","rtype",":","resource","type",":","type","rtype",":","str",":","param","rid_blacklist",":","resource","ids","to","ignore",":","type","rid_blacklist",":","[","int","]",":","return",":","a","random","selection","of","all","available","resource","IDs",":","rtype",":","int"]
code: def get_available(self, username, rtype, rid_blacklist=None):
      """
      method to get the available resource to run a job
  
      :param username: username for job running
      :type username: str
      :param rtype: resource type
      :type rtype: str
      :param rid_blacklist: resource ids to ignore
      :type rid_blacklist: [int]
      :return: a random selection of all available resource IDs
      :rtype: int
      """
      rids = self.connector.get_available_resource(
          username, rtype, rid_blacklist
      )
      logger.debug(
          "Request resource (%s) for user %s and get %s"
          % (rtype, username, rids.__str__())
      )
      return random.choice(rids) if rids else None
  
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 4 for calling the AbstractResourceManager obj's underlying member method code with example usage: obj.get_available(username, rtype, rid_blacklist) and returns: unknown