(groups, nag)
return group
groups  amount of groups in window
    nag     number of active group
    return number of neighbour group
groups  amount of groups in window
    nag     number of active group
    return number of neighbour group
groups amount of groups in window nag number of active group return number of neighbour group
def get_group(groups, nag):
    '''
    groups  amount of groups in window
    nag     number of active group
    return number of neighbour group
    '''
    if groups <= 4 and nag < 2:
        group = 1 if nag == 0 else 0
    elif groups == 4 and nag >= 2:
        group = 3 if nag == 2 else 2
    else:
        group = nag - 1
    return group
def get_group ( groups , nag ) : if groups <= 4 and nag < 2 : group = 1 if nag == 0 else 0 elif groups == 4 and nag >= 2 : group = 3 if nag == 2 else 2 else : group = nag - 1 return group