import random


def make_n_length_integer(n1, n2, allow_negative=False):
    """Function that generates an integer with specified number of digits.

    Parameters
    ----------
    n1 : int
        Lower boundary for the number of digits
    n2 : int
        Upper boundary for the number of digits
    allow_negative : boolean
        Specifies if resulting integer can be negative. Default: False

    Returns
    -------
    int
    """

    range_start = 10**(n1-1)
    range_end = (10**n2)-1
    multiplier = random.choice((1, -1)) if allow_negative else 1
    return random.randint(range_start, range_end) * multiplier