import numbers


def multiplicative_order(a: int, n=2, max_iterations=10):
    """
    This method returns the multiplicative order of an int *a modulo n*.
    For a description of the algorithm see https://en.wikipedia.org/wiki/Multiplicative_order.

    :param a: An int whose multiplicative order is to be defined.
    :param n: The parameter n which is used for the modulo operation.
    :param max_iterations: The maximum number of iterations to be performed. If no result
        has been determined after this number of iterations, None is returned.
    :return: The multiplicative order or None if no result has been found.
    """
    assert isinstance(a, numbers.Integral), "Integer value expected"

    order = None

    for e in range(1, max_iterations + 1):
        if n**e % a == 1:
            order = e
            break

    return order