class_docstr: Class that manages configuration files for a DVC repo.
  
  Args:
      dvc_dir (str): optional path to `.dvc` directory, that is used to
          access repo-specific configs like .dvc/config and
          .dvc/config.local.
      validate (bool): optional flag to tell dvc if it should validate the
          config or just load it as is. 'True' by default.
  
  Raises:
      ConfigError: thrown if config has an invalid format.
code: def __init__(
      self,
      dvc_dir: Optional[str] = None,
      local_dvc_dir: Optional[str] = None,
      validate: bool = True,
      fs: Optional["FileSystem"] = None,
      config: Optional["DictStrAny"] = None,
      remote: Optional[str] = None,
      remote_config: Optional["DictStrAny"] = None,
  ):
      from dvc.fs import LocalFileSystem
  
      dvc_dir = os.fspath(dvc_dir) if dvc_dir else None
      self.dvc_dir = dvc_dir
      self.wfs = LocalFileSystem()
      self.fs = fs or self.wfs
  
      if dvc_dir:
          self.dvc_dir = self.fs.abspath(dvc_dir)
  
      self.local_dvc_dir = local_dvc_dir
      if not fs and not local_dvc_dir:
          self.local_dvc_dir = dvc_dir
  
      self.load(
          validate=validate,
          config=config,
          remote=remote,
          remote_config=remote_config,
      )
  
imports: import os
  import re
  from contextlib import contextmanager
  from functools import partial
  from typing import TYPE_CHECKING, Dict, Optional
  from funcy import compact, memoize, re_find
  from dvc.exceptions import DvcException, NotDvcRepoError
  from dvc.log import logger
  from .utils.objects import cached_property
label_desc: Use image node_id 1 to create a new Config object from inherited base classes: dict with example: obj = Config(dvc_dir, local_dvc_dir, validate, fs, config, remote, remote_config)