docs: def extract_builder_result(builder_result, toolchain_cls=Toolchain):
      """
      Extract the builder result to produce a ``Toolchain`` and ``Spec``
      instance.
      """
  
      try:
          toolchain, spec = builder_result
      except Exception:
          return None, None
      if not isinstance(toolchain, toolchain_cls) or not isinstance(spec, Spec):
          return None, None
      return toolchain, spec