def alpha_stats(example):
    """Calculates mean and max line length of file."""
    alpha_frac = np.mean([c.isalnum() for c in example["content"]])
    return {"alpha_frac": alpha_frac}
Calculates mean and max line length of file.
dpkd/transformers/examples/research_projects/codeparrot/scripts/preprocessing.py