<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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