def METHOD_NAME(con):
    table = con.table("array_table")
    expr = table.group_by(table.key).aggregate(collected=table.array_int.collect())
    result = expr.execute().sort_values("key").reset_index(drop=True)
    df = table.compile().toPandas()
    expected = (
        df.groupby("key")
        .array_int.apply(list)
        .reset_index()
        .rename(columns={"array_int": "collected"})
    )
    tm.assert_frame_equal(result, expected)