import mpmath


def calc(algorithm: str, accuracy: int) -> mpmath.mpf:
    """Return Pi.

    Args:
        accuracy (int): accuracy
        algorithm (str): algorithm by which pi is calcurated

    Returns:
        mpmath.mpf: Pi value
    """
    pi: mpmath.mpf = globals()[algorithm].pi(accuracy)  # pylint: disable=invalid-name
    return pi