<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter_excluded_fields(fields, Meta, exclude_dump_only):
 """Filter fields that should be ignored in the OpenAPI spec :param dict fields: A dictionary of fields name field object pairs :param Meta: the schema's Meta class :param bool exclude_dump_only: whether to filter fields in Meta.dump_only """

    exclude = list(getattr(Meta, "exclude", []))
    if exclude_dump_only:
        exclude.extend(getattr(Meta, "dump_only", []))

    filtered_fields = OrderedDict(
        (key, value) for key, value in fields.items() if key not in exclude
    )

    return filtered_fields