class_docstr: Representation of a DataLad dataset/repository
  
  This is the core data type of DataLad: a representation of a dataset.
  At its core, datasets are (git-annex enabled) Git repositories. This
  class provides all operations that can be performed on a dataset.
  
  Creating a dataset instance is cheap, all actual operations are
  delayed until they are actually needed. Creating multiple `Dataset`
  class instances for the same Dataset location will automatically
  yield references to the same object.
  
  A dataset instance comprises of two major components: a `repo`
  attribute, and a `config` attribute. The former offers access to
  low-level functionality of the Git or git-annex repository. The
  latter gives access to a dataset's configuration manager.
  
  Most functionality is available via methods of this class, but also
  as stand-alone functions with the same name in `datalad.api`.
class_docstr_tok: ["Representation","of","a","DataLad","dataset\/repository","This","is","the","core","data","type","of","DataLad",":","a","representation","of","a","dataset",".","At","its","core",",","datasets","are","(","git-annex","enabled",")","Git","repositories",".","This","class","provides","all","operations","that","can","be","performed","on","a","dataset",".","Creating","a","dataset","instance","is","cheap",",","all","actual","operations","are","delayed","until","they","are","actually","needed",".","Creating","multiple","`","Dataset","`","class","instances","for","the","same","Dataset","location","will","automatically","yield","references","to","the","same","object",".","A","dataset","instance","comprises","of","two","major","components",":","a","`","repo","`","attribute",",","and","a","`","config","`","attribute",".","The","former","offers","access","to","low-level","functionality","of","the","Git","or","git-annex","repository",".","The","latter","gives","access","to","a","dataset","'s","configuration","manager",".","Most","functionality","is","available","via","methods","of","this","class",",","but","also","as","stand-alone","functions","with","the","same","name","in","`","datalad.api","`","."]
docstr: Get a ``ConfigManager`` instance for a dataset's configuration
  
  In case a dataset does not (yet) have an existing corresponding
  repository, the returned ``ConfigManager`` is the global instance
  that is also provided via ``datalad.cfg``.
  
  Note, that this property is evaluated every time it is used. If used
  multiple times within a function it's probably a good idea to store its
  value in a local variable and use this variable instead.
  
  Returns
  -------
  ConfigManager
docstr_tok: ["Get","a","``","ConfigManager","``","instance","for","a","dataset","'s","configuration","In","case","a","dataset","does","not","(","yet",")","have","an","existing","corresponding","repository",",","the","returned","``","ConfigManager","``","is","the","global","instance","that","is","also","provided","via","``","datalad.cfg","``",".","Note",",","that","this","property","is","evaluated","every","time","it","is","used",".","If","used","multiple","times","within","a","function","it","'s","probably","a","good","idea","to","store","its","value","in","a","local","variable","and","use","this","variable","instead",".","Returns","--","--","--","-","ConfigManager"]
code: def config(self):
      """Get a ``ConfigManager`` instance for a dataset's configuration
  
      In case a dataset does not (yet) have an existing corresponding
      repository, the returned ``ConfigManager`` is the global instance
      that is also provided via ``datalad.cfg``.
  
      Note, that this property is evaluated every time it is used. If used
      multiple times within a function it's probably a good idea to store its
      value in a local variable and use this variable instead.
  
      Returns
      -------
      ConfigManager
      """
      # OPT: be "smart" and avoid re-resolving .repo -- expensive in DataLad
      repo = self.repo
      if repo is None:
          # if there's no repo (yet or anymore), we can't read/write config at
          # dataset level, but only at user/system level
          # However, if this was the case before as well, we don't want a new
          # instance of ConfigManager, but use the global one
          if self._cfg_bound in (True, None):
              # for the sake of uniformity assign datalad.cfg to self._cfg
              self._cfg = cfg
              self._cfg_bound = False
  
      else:
          self._cfg = repo.config
          self._cfg_bound = True
  
      return self._cfg
  
imports: import inspect
  import logging
  from functools import wraps
  from os.path import curdir, exists, join, normpath, pardir
  from weakref import WeakValueDictionary
  from datalad import cfg
  from datalad.config import ConfigManager
  from datalad.core.local.repo import repo_from_path
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.constraints import Constraint
  from datalad.support.due import due
  from datalad.support.due_utils import duecredit_dataset
  from datalad.support.exceptions import NoDatasetFound
  from datalad.dataset.repo import path_based_str_repr, PathBasedFlyweight
  from datalad.support.gitrepo import GitRepo
  from datalad.support import path
  import datalad.utils
  from datalad.utils import getpwd, optional_args, get_dataset_root, get_sig_param_names, get_dataset_root, Path, PurePath, ensure_list
label_desc: Use image node_id 13 for calling the Dataset obj's underlying member method code with example usage: obj.config() and returns: self