def METHOD_NAME(self):
    class MyCallback1(CallbackData, prefix="test1"):
        foo: str
        bar: Optional[int] = None
    assert MyCallback1(foo="spam").pack() == "test1:spam:"
    assert MyCallback1(foo="spam", bar=42).pack() == "test1:spam:42"
    class MyCallback2(CallbackData, prefix="test2"):
        foo: Optional[str] = None
        bar: int
    assert MyCallback2(bar=42).pack() == "test2::42"
    assert MyCallback2(foo="spam", bar=42).pack() == "test2:spam:42"
    class MyCallback3(CallbackData, prefix="test3"):
        foo: Optional[str] = "experiment"
        bar: int
    assert MyCallback3(bar=42).pack() == "test3:experiment:42"
    assert MyCallback3(foo="spam", bar=42).pack() == "test3:spam:42"