import random


def gen_random_substring(s: str, length: int) -> str:
    """
    :param s: the full original text from which the substrings will be generated
    :param length: the length of the sub
    :return: a random substring of length :param length
    """
    rand_idx = random.randrange(0, len(s) - length + 1)

    return s[rand_idx: rand_idx + length]