<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def expand_alleles(p, tolerance=0):
 """ Returns expanded allele set given the tolerance. """

    _p = set()
    for x in p:
        _p |= set(range(x - tolerance, x + tolerance + 1))
    return _p