def METHOD_NAME(
    circuit: QPROGRAM,
    executor: Union[Executor, Callable[[QPROGRAM], MeasurementResult]],
    observable: Observable,
    *,
    inverse_confusion_matrix: npt.NDArray[np.float64],
) -> float:
    """Returns the readout error mitigated expectation value utilizing an
    inverse confusion matrix.
    Args:
        executor: A Mitiq executor that executes a circuit and returns the
            unmitigated ``MeasurementResult``.
        observable: Observable to compute the expectation value of (required).
        inverse_confusion_matrix: The inverse confusion matrix to apply to the
            probability vector estimated with noisy measurement results.
    Returns:
        The expectation value estimated with REM.
    """
    if not isinstance(executor, Executor):
        executor_obj = Executor(executor)
    else:
        executor_obj = executor
    executor_with_rem = mitigate_executor(
        executor_obj, inverse_confusion_matrix=inverse_confusion_matrix
    )
    # Since the input is an Executor the output is an Executor
    executor_with_rem = cast(Executor, executor_with_rem)
    return executor_with_rem.evaluate(circuit, observable)[0]