code: def _apply_force_attrs(flagdef, existing, opdef, source):
      for name, source_allowed_vals in FORCE_FLAGDEF_ATTRS:
          allowed_vals = source_allowed_vals.get(
              source.parsed_uri.scheme
          )
          if not allowed_vals:
              continue
          existing_val = getattr(existing, name)
          if existing_val and existing_val not in allowed_vals:
              log.warning(
                  "flag '%s' for operation %s is configured with %s '%s' - this "
                  "value cannot be used because it conflicts with the "
                  "dependency '%s' - ignoring configured value",
                  flagdef.name,
                  opdef.name,
                  name,
                  existing_val,
                  source.resolving_name,
              )
              setattr(existing, name, getattr(flagdef, name))
  
file_path: guildai/guild/plugins/resource_flags.py
imports: import logging
  from guild import guildfile
  from guild import op_dep
  from guild import plugin
label_desc: Use image node_id 12 for calling a global function with example usage: _apply_force_attrs(flagdef, existing, opdef, source) without return types