def validate_map_numeric_field(field_content):
    """
    Validates the field content if it is a map field (dict)
    Args:
        field_content: the field content
    Returns:
        field_content if the validation passes
    """

    # Validate that the field content is a dict
    if not isinstance(field_content, dict):
        raise InvalidArgError(
            f"The field content '{field_content}' is of type '{type(field_content).__name__}', which is not a valid type for a map field."
            f"A map field must be a dictionary."
        )

    # Validate that the dict is only of one level
    if any(isinstance(v, dict) for v in field_content.values()):
        raise InvalidArgError(
            "Nested dictionaries are not allowed in map fields. Each value must be a single int, float, or double."
        )

    # Validate that the values of the dict are int, float, or double
    for key, value in field_content.items():
        if not isinstance(key, str):
            raise InvalidArgError(
                f"Key '{key}' in map field is not a string. All keys must be strings."
            )
        if not isinstance(value, (int, float)):
            raise InvalidArgError(
                f"Value '{value}' for key '{key}' in map field is not of type int or float. If you are using an "
                f"unstructured index and attempting to index another type of object field (e.g. custom_vector field), "
                f"please use the 'mappings' object. See '{marqo_docs.mappings()}' for more info on object fields."
            )

    return field_content

    Validates the field content if it is a map field (dict)
    Args:
        field_content: the field content
    Returns:
        field_content if the validation passes
    
src/marqo/tensor_search/validation.py