code: def _dump_def_repo(cls, def_repo) -> Dict[str, str]:
      repo = {cls.PARAM_URL: def_repo[cls.PARAM_URL]}
  
      rev = def_repo.get(cls.PARAM_REV)
      if rev:
          repo[cls.PARAM_REV] = def_repo[cls.PARAM_REV]
  
      rev_lock = def_repo.get(cls.PARAM_REV_LOCK)
      if rev_lock:
          repo[cls.PARAM_REV_LOCK] = rev_lock
  
      config = def_repo.get(cls.PARAM_CONFIG)
      if config:
          repo[cls.PARAM_CONFIG] = config
  
      remote = def_repo.get(cls.PARAM_REMOTE)
      if remote:
          repo[cls.PARAM_REMOTE] = remote
      return repo
  
file_path: dvc/dvc/dependency/repo.py
imports: from copy import deepcopy
  from typing import TYPE_CHECKING, Any, Dict, Optional, Union
  import voluptuous
  from dvc.utils import as_posix
  from .base import Dependency
label_desc: Use image node_id 8 for calling the RepoDependency obj's underlying member method code with example usage: obj._dump_def_repo(cls, def_repo) and returns: repo