'Returns a random number with 1 digit (default, when digits==None),
a random number with 0 to given number of digits, or a random number
with given number to given number of digits (when ``fix_len==True``).
:param digits: maximum number of digits
:param fix_len:  should the number have fixed length?
:returns: random number with 0 to given number of digits or
fixed length number'

@classmethod
def random_number(cls, digits=None, fix_len=False):

    if (digits is None):
        digits = BaseProvider.random_digit()
    if fix_len:
        return random.randint(pow(10, (digits - 1)), (pow(10, digits) - 1))
    else:
        return random.randint(0, (pow(10, digits) - 1))
