<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean_unique_fields(self):
 """Ensure 'unique fields' are unique among entered data."""

        if not self.unique_fields:
            return

        keys = set()
        duplicates = []

        for form in self.forms:
            key = tuple(form.cleaned_data[field] for field in self.unique_fields)
            if key in keys:
                duplicates.append(",".join(key))
            else:
                keys.add(key)

        if duplicates:
            raise forms.ValidationError(
                "Fields %s should be unique; found duplicates for %s" % (
                    ','.join(self.unique_fields), duplicates))