code: def apply_resource_flags(opdef):
      for depdef in opdef.dependencies:
          try:
              resdef, _res_location = op_dep.resource_def(depdef, {})
          except op_dep.OpDependencyError:
              log.warning(
                  "cannot find resource definition for dependency %s",
                  depdef.name,
              )
          else:
              _apply_resdef_flags(resdef, 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 1 for calling a global function with example usage: apply_resource_flags(opdef) without return types