def METHOD_NAME(pd_es):
    class ThreeMostCommonCat(AggregationPrimitive):
        name = "n_most_common_categorical"
        input_types = [ColumnSchema(semantic_tags={"category"})]
        return_type = ColumnSchema(semantic_tags={"category"})
        number_output_features = 3
    class AddThree(TransformPrimitive):
        name = "add_three"
        input_types = [
            ColumnSchema(semantic_tags="numeric"),
            ColumnSchema(semantic_tags="numeric"),
            ColumnSchema(semantic_tags="numeric"),
        ]
        return_type = ColumnSchema(semantic_tags="numeric")
        commutative = True
        compatibility = [Library.PANDAS, Library.DASK, Library.SPARK]
    agg_prims, trans_prims = get_valid_primitives(pd_es, "log")
    assert ThreeMostCommonCat not in agg_prims
    assert AddThree not in trans_prims
    with pytest.raises(
        ValueError,
        match="'add_three' is not a recognized primitive name",
    ):
        agg_prims, trans_prims = get_valid_primitives(
            pd_es,
            "log",
            2,
            [ThreeMostCommonCat, "add_three"],
        )