code: def resolved_op_runs_for_opdef(
      opdef, flag_vals, resolver_factory=None
  ):
      """Returns a list of run, dep tuples for resolved run deps for opdef."""
      try:
          deps = deps_for_opdef(opdef, flag_vals)
      except OpDependencyError as e:
          log.debug("error resolving runs for opdef: %s", e)
          return []
      else:
          return list(
              _iter_resolved_op_runs(deps, flag_vals, resolver_factory)
          )
  
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 40 for calling a global function with example usage: resolved_op_runs_for_opdef(opdef, flag_vals, resolver_factory) and returns: list, list