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 _map_dirs(conf, func):
      from voluptuous import ALLOW_EXTRA, Schema
  
      dirs_schema = {
          "cache": {"dir": func},
          "remote": {
              str: {
                  "url": func,
                  "gdrive_user_credentials_file": func,
                  "gdrive_service_account_json_file_path": func,
                  "credentialpath": func,
                  "keyfile": func,
                  "cert_path": func,
                  "key_path": func,
              }
          },
          "machine": {
              str: {
                  "startup_script": func,
                  "setup_script": func,
              }
          },
      }
      return Schema(dirs_schema, extra=ALLOW_EXTRA)(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 17 for calling the Config obj's underlying member method code with example usage: obj._map_dirs(conf, func) and returns: Schema