import string
import random


def generate_random_string(
    length=25, allowed_chars=string.ascii_letters + string.digits
):
    """
    Generate a random string.

    :param length: The length of the desired string
    :type length: int
    :param allowed_chars: The set of allowed characters
    :type allowed_chars: str
    :returns: Random string
    :rtype: str
    """
    return "".join(random.choice(allowed_chars) for i in range(length))