code: def _check(self, conf, remote_or_db, section, opt=None):
      from dvc.config import ConfigError
  
      name = remote_or_db or "section"
      if section not in conf:
          raise ConfigError(f"{name} '{section}' doesn't exist")
  
      if opt and opt not in conf[section]:
          raise ConfigError(
              f"option '{opt}' doesn't exist in {name} '{section}'"
          )
  
imports: import argparse
  import os
  from funcy import set_in
  from dvc.cli import formatter
  from dvc.cli.command import CmdBaseNoRepo
  from dvc.cli.utils import append_doc_link
  from dvc.log import logger
  from dvc.ui import ui
label_desc: Use image node_id 6 for calling the CmdConfig obj's underlying member method code with example usage: obj._check(conf, remote_or_db, section, opt) without return types