def _validate_or_infer_pooling_method(cls, values):
        """Infer the pooling_method from the model name if it is not provided.

        If the pooling_method is provided, return the values as is.
        """
        pooling_method = values.get("pooling_method") or values.get("poolingMethod")
        if pooling_method is not None:
            return values
        name = values.get('name')
        if isinstance(name, str) and name:
            pooling_method = cls._infer_pooling_method_from_name(name)
        else:
            pooling_method = PoolingMethod.Mean
        values["pooling_method"] = pooling_method
        return values
Infer the pooling_method from the model name if it is not provided.

        If the pooling_method is provided, return the values as is.
        
src/marqo/inference/native_inference/embedding_models/hugging_face_model_properties.py