code: def fill_stage_dependencies(
      stage, deps=None, erepo=None, params=None, fs_config=None, db=None
  ):
      from dvc.dependency import loads_from, loads_params
  
      assert not stage.deps
      stage.deps = []
      stage.deps += loads_from(
          stage, deps or [], erepo=erepo, fs_config=fs_config, db=db
      )
      stage.deps += loads_params(stage, params or [])
  
imports: import os
  import pathlib
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
  from funcy import concat, first, lsplit, rpartial
  from dvc.annotations import ANNOTATION_FIELDS
  from dvc.exceptions import InvalidArgumentError
  from dvc_data.hashfile.meta import Meta
  from .exceptions import MissingDataSource, StageExternalOutputsError, StagePathNotDirectoryError, StagePathNotFoundError, StagePathOutsideError
label_desc: Use image node_id 3 for calling a global function with example usage: fill_stage_dependencies(stage, deps, erepo, params, fs_config, db) without return types