python prototype regroup and searchkl