<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_declared_enums(metadata, schema, default):
 """ Return a dict mapping SQLAlchemy enumeration types to the set of their declared values. :param metadata: :param str schema: Schema name (e.g. "public"). :returns dict: { "my_enum": frozenset(["a", "b", "c"]), } """

    types = set(column.type
                for table in metadata.tables.values()
                for column in table.columns
                if (isinstance(column.type, sqlalchemy.Enum) and
                    schema == (column.type.schema or default)))
    return {t.name: frozenset(t.enums) for t in types}