class_docstr: Class that manages experiments in a DVC repo.
  
  Args:
      repo (dvc.repo.Repo): repo instance that these experiments belong to.
class_docstr_tok: ["Class","that","manages","experiments","in","a","DVC","repo",".","Args",":","repo","(","dvc.repo.Repo",")",":","repo","instance","that","these","experiments","belong","to","."]
docstr: Create and enqueue a new experiment.
  
  Experiment will be derived from the current workspace.
docstr_tok: ["Create","and","enqueue","a","new","experiment",".","Experiment","will","be","derived","from","the","current","workspace","."]
code: def new(
      self,
      queue: "BaseStashQueue",
      *args,
      **kwargs,
  ) -> "QueueEntry":
      """Create and enqueue a new experiment.
  
      Experiment will be derived from the current workspace.
      """
  
      name = kwargs.get("name", None)
      baseline_sha = (
          kwargs.get("baseline_rev") or self.repo.scm.get_rev()
      )
  
      if name:
          exp_ref = ExpRefInfo(baseline_sha=baseline_sha, name=name)
          check_ref_format(self.scm, exp_ref)
          force = kwargs.get("force", False)
          if self.scm.get_ref(str(exp_ref)) and not force:
              raise ExperimentExistsError(exp_ref.name)
  
      return queue.put(*args, **kwargs)
  
imports: import os
  import re
  from typing import TYPE_CHECKING, Dict, Iterable, List, Optional
  from funcy import chain, first
  from dvc.log import logger
  from dvc.ui import ui
  from dvc.utils import relpath
  from dvc.utils.objects import cached_property
  from .cache import ExpCache
  from .exceptions import BaselineMismatchError, ExperimentExistsError, InvalidExpRefError, MultipleBranchError
  from .refs import APPLY_STASH, CELERY_FAILED_STASH, CELERY_STASH, EXEC_APPLY, EXEC_NAMESPACE, EXPS_NAMESPACE, WORKSPACE_STASH, ExpRefInfo
  from .stash import ApplyStash
  from .utils import check_ref_format, exp_refs_by_rev, unlocked_repo
label_desc: Use image node_id 15 for calling the Experiments obj's underlying member method code with example usage: obj.new(queue) and returns: queue