def generate_random_string(chars=string.ascii_uppercase + string.digits):
"""
Generates a random string for input testing.
Ref: https://stackoverflow.com/questions/2257441/random-string-generation-with-upper-case-letters-and-digits-in-python
"""
size=random.randint(1, 10)
return ''.join(random.choice(chars) for _ in range(size))