code: def fill_stage_outputs(stage, **kwargs):
      from dvc.output import loads_from
  
      assert not stage.outs
  
      keys = [
          "outs_persist",
          "outs_persist_no_cache",
          "metrics",
          "metrics_persist",
          "metrics_no_cache",
          "metrics_persist_no_cache",
          "plots",
          "plots_persist",
          "plots_no_cache",
          "plots_persist_no_cache",
          "outs_no_cache",
          "outs",
      ]
  
      stage.outs = []
  
      for key in keys:
          stage.outs += loads_from(
              stage,
              kwargs.get(key, []),
              use_cache="no_cache" not in key,
              persist="persist" in key,
              metric="metrics" in key,
              plot="plots" in key,
          )
  
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 2 for calling a global function with example usage: fill_stage_outputs(stage) without return types