class_docstr: Experiment Class - create and run an experiment
  
  :param exp_config: configuration of the experiment
  :type exp_config: BasicConfig.BasicConfig
  :param username: username, default: None - will use login username
  :type username: str
  :param connector: connector to database
  :type connector: AbstractConnector
  :param auppath: Auptimizer env.ini file folder, default is either ``./.aup`` or ``~/.aup``
  :type auppath: str
  :param sleep_time: time to pause between jobs
  :type sleep_time: int
class_docstr_tok: ["Experiment","Class","-","create","and","run","an","experiment",":","param","exp_config",":","configuration","of","the","experiment",":","type","exp_config",":","BasicConfig.BasicConfig",":","param","username",":","username",",","default",":","None","-","will","use","login","username",":","type","username",":","str",":","param","connector",":","connector","to","database",":","type","connector",":","AbstractConnector",":","param","auppath",":","Auptimizer","env.ini","file","folder",",","default","is","either","``",".\/.aup","``","or","``","~\/.aup","``",":","type","auppath",":","str",":","param","sleep_time",":","time","to","pause","between","jobs",":","type","sleep_time",":","int"]
docstr: Finish experiment if no job is running
  
  :return: job id, best score
  :rtype: (int, float)
docstr_tok: ["Finish","experiment","if","no","job","is","running",":","return",":","job","id",",","best","score",":","rtype",":","(","int",",","float",")"]
code: def finish(self):
      """
      Finish experiment if no job is running
  
      :return: job id, best score
      :rtype: (int, float)
      """
      while self.proposer.get_status() == ProposerStatus.RUNNING:
          logger.debug("Waiting for proposer")
          time.sleep(self.sleep_time)
  
      while len(self.pending_jobs) != 0:
          # resource manager will prevent experiment shutdown with pending jobs.
          # but just in case
          logger.debug("Waiting for pending job")
          time.sleep(self.sleep_time)
  
      result = self.resource_manager.finish(
          status=self.proposer.get_status().name
      )
      self.connector.close()
  
      if self.request_stop_thr is not None:
          self.request_stop_thr.join()
  
      if result is None or len(result) == 0:
          logger.warning("No result so far")
          return None, -1
      else:
          logger.info("Finished")
          logger.critical(
              "Best job (%d) with score %f in experiment %d"
              % (result[0], result[1], self.eid)
          )
          try:
              self.proposer.save(
                  os.path.join(".", "exp%d.pkl" % self.eid)
              )
          except NotImplementedError:
              pass
          return result[:2]
  
imports: import json
  import logging
  import os
  import signal
  import sys
  import _thread
  import threading
  import time
  from ..Proposer import get_proposer, SPECIAL_EXIT_PROPOSERS
  from .Job import Job
  from .Resource import get_resource_manager
  from ..aup import BasicConfig
  from ..utils import set_default_keyvalue, check_missing_key, get_default_connector, get_default_username
  from ..compression.utils import *
  from ..Proposer import ProposerStatus
label_desc: Use image node_id 4 for calling the Experiment obj's underlying member method code with example usage: obj.finish() and returns: None,  unknown, result