# Method 3: Extend with decorators @MyTransform def encodes(self, x: float): return f"encoded float: {x=}" # Now our transform handles three types! my_transform(("hello", 42, 6.28))