def find_record(self, query, records):
        possibilities = search(query, records)
        if len(possibilities) > 1:
            choices = disambiguate(possibilities)
            for i, choice in enumerate(choices):
                self.output.write('%s) %s\n' % (i, choice))
            choice = self.prompt('Which did you mean? [0]: ', required=False) or 0
            return possibilities[int(choice)]
        else:
            return possibilities[0]
dataset/ETHPy150Open gavinwahl/sdb/sdb/passwords.py/InteractiveSession.find_record/original