<s> from . . operation import operation <EOL> from . . dev import experimental <EOL> from . . prototypes import * <EOL> @ experimental <EOL> @ rename_fields . register ( "<STR_LIT:*>" ) <EOL> def rename_fields ( ctx , obj , rename ) : <EOL> return ctx . op . field_filter ( obj , rename = rename ) <EOL> @ experimental <EOL> @ drop_fields . register ( "<STR_LIT:*>" ) <EOL> def drop_fields ( ctx , obj , drop ) : <EOL> return ctx . op . field_filter ( obj , drop = drop ) <EOL> @ experimental <EOL> @ keep_fields . register ( "<STR_LIT:*>" ) <EOL> def keep_fields ( ctx , obj , keep ) : <EOL> return ctx . op . field_filter ( obj , keep = keep ) <EOL> @ debug_fields . register ( "<STR_LIT:*>" ) <EOL> def debug_fields ( ctx , obj , label = None ) : <EOL> if label : <EOL> label = "<STR_LIT>" % label <EOL> else : <EOL> label = "<STR_LIT>" <EOL> ctx . logger . info ( "<STR_LIT>" % ( label , obj . fields ) ) <EOL> return obj </s>
