def METHOD_NAME(i, j, groups):  # pragma: no cover
    for group in groups:
        if i in group:
            group.add(j)
            return
        if j in group:
            group.add(i)
            return
    # pair is not in a sector yet - create new one
    groups.append({i, j})