code: def get_index_fields(self):
          
          index_fields = self.get_meta_option('index', [])
          if index_fields:
              return index_fields
  
          model = getattr(self.model_serializer_meta, 'model', None)
          if model:
              pk_name = model._meta.pk.name
              if pk_name in self.child.get_fields():
                  return [pk_name]
  
          return []
docs: List of fields to use for index