code: def _iter_replacements_for_source(src, opdef):
      for flagdef in opdef.flags:
          nb_replace = flagdef.extra.get("nb-replace")
          if not nb_replace:
              continue
          try:
              m = re.search(nb_replace, src, re.MULTILINE)
          except ValueError:
              pass
          else:
              if m and m.regs:
                  val_str = _replacement_capture(m, src)
                  try:
                      # pylint: disable=eval-used
                      val = eval(val_str)
                  except Exception as e:
                      if log.getEffectiveLevel() < logging.DEBUG:
                          log.exception(
                              "evaluating captured string %r", val_str
                          )
                      else:
                          log.warning(
                              "cannot decode captured string %r: %s",
                              val_str,
                              e,
                          )
                  else:
                      yield flagdef.name, val
  
imports: import ast
  import json
  import logging
  import os
  import re
  from guild import config
  from guild import guildfile
  from guild import model
  from guild import plugin
  from guild import python_util
  from guild import util
  from .None import flags_import_util
label_desc: Use image node_id 12 for calling a global function with example usage: _iter_replacements_for_source(src, opdef) without return types