code: def _flagdef_for_source(source, opdef):
      flag_data = _flag_data_for_source(source)
      if not flag_data:
          return None
      return guildfile.FlagDef(flag_data["name"], flag_data, opdef)
  
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 3 for calling a global function with example usage: _flagdef_for_source(source, opdef) and returns: guildfile, None