def matches_constraints(
    field,
    ftype=None,
    embedded_doc_type=None,
    subfield=None,
    read_only=None,
    info_keys=None,
    created_after=None,
):
    """Determines whether the field matches the given constraints.

    Args:
        field: a :class:`Field`
        ftype (None): an optional field type or iterable of types to enforce.
            Must be subclass(es) of :class:`Field`
        embedded_doc_type (None): an optional embedded document type or
            iterable of types to enforce. Must be subclass(es) of
            :class:`fiftyone.core.odm.BaseEmbeddedDocument`
        subfield (None): an optional subfield type or iterable of subfield
            types to enforce. Must be subclass(es) of :class:`Field`
        read_only (None): whether to optionally enforce that the field is
            read-only (True) or not read-only (False)
        info_keys (None): an optional key or list of keys that must be in the
            field's ``info`` dict
        created_after (None): an optional ``datetime`` specifying a minimum
            creation date

    Returns:
        True/False
    """
    if ftype is None:
        if embedded_doc_type is not None:
            ftype = EmbeddedDocumentField

        if subfield is not None:
            ftype = (ListField, DictField)

    if ftype is not None:
        if etau.is_container(ftype):
            ftype = tuple(ftype)

        if not isinstance(field, ftype):
            return False

    if embedded_doc_type is not None:
        if etau.is_container(embedded_doc_type):
            embedded_doc_type = tuple(embedded_doc_type)

        if isinstance(field, EmbeddedDocumentField) and not issubclass(
            field.document_type, embedded_doc_type
        ):
            return False

    if subfield is not None:
        if etau.is_container(subfield):
            subfield = tuple(subfield)

        if isinstance(field, (ListField, DictField)) and not isinstance(
            field.field, subfield
        ):
            return False

    if read_only is not None and read_only != field.read_only:
        return False

    if info_keys is not None:
        key_set = {info_keys} if isinstance(info_keys, str) else set(info_keys)
        if field.info is None or not set(field.info.keys()).issubset(key_set):
            return False

    if (
        created_after is not None
        and field.created_at is not None
        and field.created_at > created_after
    ):
        return False

    return True
Determines whether the field matches the given constraints.

    Args:
        field: a :class:`Field`
        ftype (None): an optional field type or iterable of types to enforce.
            Must be subclass(es) of :class:`Field`
        embedded_doc_type (None): an optional embedded document type or
            iterable of types to enforce. Must be subclass(es) of
            :class:`fiftyone.core.odm.BaseEmbeddedDocument`
        subfield (None): an optional subfield type or iterable of subfield
            types to enforce. Must be subclass(es) of :class:`Field`
        read_only (None): whether to optionally enforce that the field is
            read-only (True) or not read-only (False)
        info_keys (None): an optional key or list of keys that must be in the
            field's ``info`` dict
        created_after (None): an optional ``datetime`` specifying a minimum
            creation date

    Returns:
        True/False
    
fiftyone/core/fields.py