                  model_field.unique_for_month,
                  model_field.unique_for_year
              ])
  
          unique_constraint_names -= set([None])
  
          # Include each of the `unique_together` field names,
          # so long as all the field names are included on the serializer.
          for parent_class in [model] + list(model._meta.parents.keys()):
              for unique_together_list in parent_class._meta.unique_together:
 
</s> remove             unique_constraint_names |= set([
                model_field.unique_for_date,
                model_field.unique_for_month,
                model_field.unique_for_year
            ])
 </s> add             unique_constraint_names |= {model_field.unique_for_date, model_field.unique_for_month,
                                        model_field.unique_for_year} </s> remove         ])
 </s> add         } </s> remove         field_names = set([
 </s> add         field_names = { </s> remove         ])
 </s> add         } </s> remove     included = set((
        1,
        current - 1, current, current + 1,
        final
    ))
 </s> add     included = {1, current - 1, current, current + 1, final}
        unique_constraint_names -= {None}
                  model_field.unique_for_month,
                  model_field.unique_for_year
              ])
  
        unique_constraint_names -= {None}
  
          # Include each of the `unique_together` field names,
          # so long as all the field names are included on the serializer.
          for parent_class in [model] + list(model._meta.parents.keys()):
              for unique_together_list in parent_class._meta.unique_together:
keep keep keep keep replace keep keep keep keep keep
 Replaced all dict and set conversions from lists to dict and set literals. 
rest_framework/serializers.py