def validate_custom_properties(cls, values):
        """Validate custom model properties.

        Raises:
            InvalidArgumentError: If model properties are invalid.
        """
        model_name = values.get('name')
        properties = values.get('properties')
        custom = values.get('custom')
        if properties and custom:
            try:
                s2_inference.validate_model_properties(model_name, properties)
            except InvalidModelPropertiesError as e:
                raise ValueError(
                    f'Invalid model properties for model={model_name}. Reason: {e}.')
        return values
Validate custom model properties.

        Raises:
            InvalidArgumentError: If model properties are invalid.
        
src/marqo/core/models/marqo_index.py