def dict(self, *args, **kwargs):
        """
        Custom dict method that removes the properties field if the model is not custom. This ensures we don't store
        non-custom model properties when serializing and saving the index.
        """
        d = super().dict(*args, **kwargs)
        if not self.custom:
            d.pop('properties', None)
        return d

        Custom dict method that removes the properties field if the model is not custom. This ensures we don't store
        non-custom model properties when serializing and saving the index.
        
src/marqo/core/models/marqo_index.py