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.
docstr: Loads config from all the config files.
  
  Raises:
      ConfigError: thrown if config has an invalid format.
docstr_tok: ["Loads","config","from","all","the","config","files",".","Raises",":","ConfigError",":","thrown","if","config","has","an","invalid","format","."]
code: def load(
      self,
      validate: bool = True,
      config: Optional["DictStrAny"] = None,
      remote: Optional[str] = None,
      remote_config: Optional["DictStrAny"] = None,
  ):
      """Loads config from all the config files.
  
      Raises:
          ConfigError: thrown if config has an invalid format.
      """
      conf = self.load_config_to_level()
  
      if config is not None:
          merge(conf, config)
  
      if validate:
          conf = self.validate(conf)
  
      self.clear()
  
      if remote:
          conf["core"]["remote"] = remote
  
      if remote_config:
          remote = remote or conf["core"].get("remote")
          if not remote:
              raise ValueError("Missing remote name")
  
          merge(conf, {"remote": {remote: remote_config}})
  
      self.update(conf)
  
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 7 for calling the Config obj's underlying member method code with example usage: obj.load(validate, config, remote, remote_config) without return types