def METHOD_NAME(self, operator: OperatorBase) -> OperatorBase:
    """Return an expression that computes the CVaR expectation upon calling ``eval``.
    Args:
        operator: The operator to convert.
    Returns:
        The converted operator.
    """
    expectation = self.expectation.METHOD_NAME(operator)
    # replace OperatorMeasurements by CVaRMeasurement
    def replace_with_cvar(operator):
        if isinstance(operator, OperatorStateFn) and operator.is_measurement:
            return CVaRMeasurement(operator.primitive, alpha=self.alpha)
        elif isinstance(operator, ListOp):
            return operator.traverse(replace_with_cvar)
        return operator
    return replace_with_cvar(expectation)