Recipes and Tricks for Effective Structural Pattern Matching in Python