def getAabrhContext(pos, aabrhNumT, coreSynWsize):
    """Starting at index pos in aabrhNumT, return the coreSynWsize/2 aabrh
group numbers to each side (not including the gene at pos)."""
    numToTakeEachSide = int(coreSynWsize / 2)
    coreSynL = []
    ct = 0
    j = pos + 1
    while j < len(aabrhNumT) and ct < numToTakeEachSide:
        if aabrhNumT[j] != None:
            coreSynL.append(aabrhNumT[j])
            ct += 1
        j += 1
    ct = 0
    j = pos - 1
    while j >= 0 and ct < numToTakeEachSide:
        if aabrhNumT[j] != None:
            coreSynL.append(aabrhNumT[j])
            ct += 1
        j -= 1
    return tuple(coreSynL)
