code: def _apply_stage_flags_data(stage, dvc_config, data):
      applied_flags_dest = None
      imports = set()
      for param_name, config_name in dvc_util.iter_stage_params(
          stage, dvc_config
      ):
          if applied_flags_dest is None:
              data["flags-dest"] = f"config:{config_name}"
              imports.add(param_name)
              applied_flags_dest = config_name
          elif applied_flags_dest != config_name:
              log.warning(
                  "DvC stage '%s' uses multiple param files, ignoring "
                  "subsequent file %s for flags import",
                  stage,
                  config_name,
              )
          else:
              imports.add(param_name)
      data["flags-import"] = sorted(imports)
  
imports: import copy
  import logging
  import os
  from guild import config
  from guild import guildfile
  from guild import model
  from guild import plugin
  from guild import resolver
  from guild import resourcedef
  from guild import run_manifest
  from guild import util
  from .None import dvc_util
label_desc: Use image node_id 4 for calling a global function with example usage: _apply_stage_flags_data(stage, dvc_config, data) without return types