code: def _iter_resolved_op_runs(deps, flag_vals, resolver_factory=None):
      """Returns an iteration over resolved runs for deps and flag values.
  
      Each iteration is a tuple of run and associated dependency from
      `deps`.
  
      If there are flag values that can be used to resolve a run for a
      given resource in deps, they're used, otherwise tries the default
      run. Logs a warning message for each non-optional resource source
      that cannot be resolved with at least one run.
      """
      resolver_factory = resolver_factory or resolver_for_source
      for dep in deps:
          run_id_candidates = _run_id_flag_val_candidates(
              dep.resdef, flag_vals
          )
          for op_source in _op_sources_for_dep(dep):
              resolver = resolver_factory(op_source, dep)
              resolved = _resolve_runs_for_run_id_candidates(
                  run_id_candidates, resolver
              )
              _maybe_warn_no_resolved_runs_for_op_source(
                  resolved, op_source
              )
              for run in resolved:
                  yield run, op_source
  
imports: import os
  import re
  import logging
  import typing
  from guild import cli
  from guild import resolver
  from guild import resourcedef
  from guild import util
label_desc: Use image node_id 41 for calling a global function with example usage: _iter_resolved_op_runs(deps, flag_vals, resolver_factory) without return types