def _infer_modality_based_on_mime_type(mime_object: str) -> Modality:
    """
    Infer the modality based on the MIME type. If it is not a known MIME type, return TEXT.

    Args:
        mime_object: the MIME type of the content (e.g., 'image/jpeg', 'video/mp4', etc.)

    Returns:
        Modality: The inferred modality (IMAGE, VIDEO, AUDIO, or TEXT if unknown)
    """
    if mime_object.startswith('image/'):
        return Modality.IMAGE
    elif mime_object.startswith('video/'):
        return Modality.VIDEO
    elif mime_object.startswith('audio/'):
        return Modality.AUDIO
    else:
        return Modality.TEXT

    Infer the modality based on the MIME type. If it is not a known MIME type, return TEXT.

    Args:
        mime_object: the MIME type of the content (e.g., 'image/jpeg', 'video/mp4', etc.)

    Returns:
        Modality: The inferred modality (IMAGE, VIDEO, AUDIO, or TEXT if unknown)
    
src/marqo/core/inference/modality_utils.py