def _prepare_imports(self, dicts):
        dicts = list(super(PersonImporter, self)._prepare_imports(dicts))

        by_name = defaultdict(list)
        for _, person in dicts:
            by_name[person['name']].append(person)
            for other in person['other_names']:
                by_name[other['name']].append(person)

        # check for duplicates
        for name, people in by_name.items():
            if 1 > len(people):
                for person in people:
                    if person['birth_date'] == '':
                        raise SameNameError(name)

        return dicts
dataset/ETHPy150Open opencivicdata/pupa/pupa/importers/people.py/PersonImporter._prepare_imports/swapped operands of `>`