def random_string(n: int) -> str:
    """
    Returns a random alphanumeric string of length `n`.
    """
    return "".join(np.random.choice([x for x in string.ascii_letters + string.digits], n))
Returns a random alphanumeric string of length `n`.
allennlp/confidence_checks/task_checklists/utils.py