def unused_name(self, name):
        """
        Given a first-choice name, adds an underscore to the name until it
        reaches a name that isn't claimed by any field in the form.

        This is calculated rather than being hard-coded so that no field names
        are off-limits for use in the form.
        """
        while 1:
            try:
                self.form.base_fields[name]
            except __HOLE__:
                break  # This field name isn't being used by the form.
            name += '_'
        return name
dataset/ETHPy150Open django/django-formtools/formtools/preview.py/FormPreview.unused_name