def list_types_valid(field_content: List) -> bool:
    """
    Verify all list elements are of the same type and that type is int, float or string.

    Returns:
        True if all elements are of the same type and that type is int, float or string
    """
    if len(field_content) == 0:
        return True
    list_type = type(field_content[0])
    if list_type not in [int, float, str]:
        return False
    for element in field_content:
        if type(element) != list_type:
            return False
    return True

    Verify all list elements are of the same type and that type is int, float or string.

    Returns:
        True if all elements are of the same type and that type is int, float or string
    
src/marqo/tensor_search/validation.py