def revcmap(data):
 data_r = {}
 for (key, val) in six.iteritems(data):
  if callable(val):
   valnew = _reverser(val)
  else:
   valnew = [((1.0 - x), y1, y0) for (x, y0, y1) in reversed(val)]
  data_r[key] = valnew
 return data_r

def revcmap ( data ) : data_r = { } for ( key , val ) in six . iteritems ( data ) : if callable ( val ) : valnew = _reverser ( val ) else : valnew = [ ( ( 1.0 - x ) , y1 , y0 ) for ( x , y0 , y1 ) in reversed ( val ) ] data_r [ key ] = valnew return data_r
can only handle specification *data* in dictionary format .