#NEWLINE# def __init__( self , key_name , data_type , * args , **kwargs ) : #NEWLINE# #INDENT# subspec = kwargs . pop ( 'subspec' , None ) #NEWLINE# super ( KeyTransform , self ) . __init__ ( * args , ** kwargs ) #NEWLINE# self . key_name = key_name #NEWLINE# self . data_type = data_type #NEWLINE# try : #NEWLINE# #INDENT# output_field = self . TYPE_MAP [ args ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise ValueError ( "Invalid data_type '{}'" . format ( data_type ) ) #NEWLINE# #UNINDENT# if ( data_type == 'BINARY' ) : #NEWLINE# #INDENT# self . output_field = output_field ( spec = subspec ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . output_field = output_field