def mean(rv, max_iter=int(1e5), tol=1e-5):
    """
    Returns the mean of `rv`.

    In general computed numerically using up to `max_iter`
    successive approximations or until these approximations no longer
    change by more than `tol`. However, subclasses of `RandomVariable`
    may override the `mean` to produce an exact value.

    :param rv: RandomVariable
    :param max_iter: int
    :param tol: float
    """
    return rv.mean(max_iter=max_iter, tol=tol)