code: def _get(stage, p, info, **kwargs):
      d = info or {}
      params = d.pop(ParamsDependency.PARAM_PARAMS, None)
      repo = d.pop(RepoDependency.PARAM_REPO, None)
  
      if params:
          return ParamsDependency(stage, p, params)
      if DbDependency.PARAM_DB in d:
          return DbDependency(stage, d)
  
      assert p
      if repo:
          return RepoDependency(repo, stage, p, info)
      return Dependency(stage, p, info, **kwargs)
  
file_path: dvc/dvc/dependency/__init__.py
imports: from collections import defaultdict
  from typing import Any, Dict, List, Mapping, Set
  from dvc.output import ARTIFACT_SCHEMA, DIR_FILES_SCHEMA, Output
  from .base import Dependency
  from .db import DbDependency
  from .param import ParamsDependency
  from .repo import RepoDependency
label_desc: Use image node_id 1 for calling a global function with example usage: _get(stage, p, info) and returns: Dependency, ParamsDependency, DbDependency, RepoDependency