def content_type(transformers, default=None):
 transformers = {content_type: (auto_kwargs(transformer) if transformer else transformer) for (content_type, transformer) in transformers.items()}
 default = (default and auto_kwargs(default))
 def transform(data, request):
  transformer = transformers.get(request.content_type.split(';')[0], default)
  if (not transformer):
   return data
  return transformer(data)
 return transform

def content_type ( transformers , default = None ) : transformers = { content_type : ( auto_kwargs ( transformer ) if transformer else transformer ) for ( content_type , transformer ) in transformers . items ( ) } default = ( default and auto_kwargs ( default ) ) def transform ( data , request ) : transformer = transformers . get ( request . content_type . split ( ';' ) [ 0 ] , default ) if ( not transformer ) : return data return transformer ( data ) return transform
attaches the supplied content_type to a hug formatting function .