code: def _apply_flagdef(flagdef, opdef, source):
      existing = opdef.get_flagdef(flagdef.name)
      if existing:
          _apply_missing_flagdef_attrs(flagdef, existing, opdef, source)
      else:
          opdef.flags.append(flagdef)
  
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 6 for calling a global function with example usage: _apply_flagdef(flagdef, opdef, source) without return types