def METHOD_NAME(table: Table) -> TableInfo:
    table_info = TableInfo(fields={}, relationships=[])
    if table.comment:
        table_info["comment"] = table.comment
    for column in table.columns:
        column_type = type(column.type)
        if column_type not in SQLALCHEMY_TO_DBML:
            raise TypeError(type(column.type))
        if column.default is not None:
            default = column.default.arg  # type: ignore[attr-defined]
        elif column.server_default is not None:
            match str(type(column.server_default)):
                case "<class 'sqlalchemy.sql.schema.DefaultClause'>":
                    default = column.server_default.arg  # type: ignore[attr-defined]
                case _:
                    default = column.server_default
        else:
            default = None
        table_info["fields"][column.name] = {
            "type": SQLALCHEMY_TO_DBML[column_type],
            "pk": column.primary_key,
            "unique": column.unique,
            "nullable": column.nullable,  # type: ignore[typeddict-item]
            "default": default,
            "comment": column.comment,  # type: ignore[typeddict-item]
        }
        for foreign_key in column.foreign_keys:
            table_info["relationships"].append(
                RelationshipInfo(
                    table_from=table.name,
                    table_to=foreign_key.column.table.name,
                    table_from_field=column.name,
                    table_to_field=foreign_key.column.name,
                )
            )
    return table_info