def get_implied_field_kwargs(value, dynamic=False):
    """Infers the field keyword arguments dictionary for a field that can hold
    the given value.

    Args:
        value: a value
        dynamic (False): whether to declare dynamic embedded document fields

    Returns:
        a field specification dict
    """
    if isinstance(value, fooe.BaseEmbeddedDocument):
        return {
            "ftype": fof.EmbeddedDocumentField,
            "embedded_doc_type": type(value),
            "fields": _parse_embedded_doc_fields(value, dynamic),
        }

    if isinstance(value, (bool, np.bool_)):
        return {"ftype": fof.BooleanField}

    if isinstance(value, numbers.Integral):
        return {"ftype": fof.IntField}

    if isinstance(value, numbers.Number):
        return {"ftype": fof.FloatField}

    if isinstance(value, str):
        return {"ftype": fof.StringField}

    if isinstance(value, ObjectId):
        return {"ftype": fof.ObjectIdField}

    if isinstance(value, datetime):
        return {"ftype": fof.DateTimeField}

    if isinstance(value, date):
        return {"ftype": fof.DateField}

    if isinstance(value, (list, tuple)):
        kwargs = {"ftype": fof.ListField}

        value_types = set(_get_field_type(v) for v in value)
        value_types.discard(None)

        if value_types == {fof.IntField, fof.FloatField}:
            value_types.discard(fof.IntField)

        if len(value_types) == 1:
            value_type = next(iter(value_types))
            kwargs["subfield"] = value_type

            if value_type == fof.EmbeddedDocumentField:
                document_type = _get_list_subfield_type(value)
                fields = _parse_embedded_doc_list_fields(value, dynamic)
                kwargs["embedded_doc_type"] = document_type
                kwargs["fields"] = fields

        return kwargs

    if isinstance(value, np.ndarray):
        if value.ndim == 1:
            return {"ftype": fof.VectorField}

        return {"ftype": fof.ArrayField}

    if isinstance(value, dict):
        return {"ftype": fof.DictField}

    raise TypeError(
        "Cannot infer an appropriate field type for value '%s'" % value
    )
Infers the field keyword arguments dictionary for a field that can hold
    the given value.

    Args:
        value: a value
        dynamic (False): whether to declare dynamic embedded document fields

    Returns:
        a field specification dict
    
fiftyone/core/odm/utils.py