class_docstr: Data provider for managing experiment lifecycle.
class_docstr_tok: ["Data","provider","for","managing","experiment","lifecycle","."]
code: def delete_experiment(self, experiment):
      if experiment is None:
          return
      if isinstance(experiment, str):
          try:
              experiment = self.get_experiment(
                  experiment, getinfo=False
              )
              experiment_key = experiment.key
          except BaseException:
              check_for_kb_interrupt()
              return
      else:
          experiment_key = experiment.key
  
      experiment_dict = self._get(
          self._get_experiments_keybase() + experiment_key
      )
      if experiment_dict is None:
          self.logger.error(
              "FAILED to delete experiment %s: NOT FOUND.",
              experiment_key,
          )
          return
  
      from_compl_service: bool = experiment_dict.get(
          "from_compl_service", False
      )
      experiment_owner = experiment_dict.get("owner")
      if experiment_owner is not None and not from_compl_service:
          self._delete(
              self._get_user_keybase(experiment_owner)
              + "experiments/"
              + experiment_key,
              shallow=False,
          )
  
      if experiment is not None:
          for tag, art in experiment.artifacts.items():
              if art.key is not None and art.is_mutable:
                  msg: str = (
                      "Deleting artifact {0} from the store, "
                      + "artifact key {1}"
                  ).format(tag, art.key)
                  self.logger.debug(msg)
                  art.delete()
  
          if experiment.project is not None and not from_compl_service:
              self._delete(
                  self._get_projects_keybase()
                  + experiment.project
                  + "/"
                  + experiment_key
                  + "/"
                  + "owner",
                  shallow=False,
              )
  
      self._delete(
          self._get_experiments_keybase() + experiment_key,
          shallow=False,
      )
  
imports: import time
  from concurrent.futures import ThreadPoolExecutor, wait
  from studio.util import util, logs
  from studio.storage.storage_handler import StorageHandler
  from studio.artifacts.artifact import Artifact
  from studio.experiments.experiment import Experiment, experiment_from_dict
  from studio.storage.storage_setup import get_storage_verbose_level
  from studio.util.util import retry, report_fatal, compression_to_extension, check_for_kb_interrupt
label_desc: Use image node_id 15 for calling the KeyValueProvider obj's underlying member method code with example usage: obj.delete_experiment(experiment) without return types