def METHOD_NAME(self, batch: Tuple[Any, Any]):
    X, _ = batch
    n_samples_seen_ = count(X)
    feature_names_in_ = get_columns(X)
    agg_op = Aggregate(columns={c: collect_set(it[c]) for c in feature_names_in_})
    agg_data = agg_op.transform(X)
    agg_data = _ensure_pandas(agg_data)
    categories_ = [np.sort(agg_data.loc[0, c]) for c in feature_names_in_]
    return _OneHotEncoderMonoid(
        n_samples_seen_=n_samples_seen_,
        feature_names_in_=feature_names_in_,
        categories_=categories_,
    )