More complex metaprogramming with metaclasses