def parameterize(ref):
 params = ref.copy()
 for key in ref:
  if (key[(-3):] == '_id'):
   params.setdefault(key[:(-3)], params.pop(key))
 return params

def parameterize ( ref ) : params = ref . copy ( ) for key in ref : if ( key [ ( - 3 ) : ] == '_id' ) : params . setdefault ( key [ : ( - 3 ) ] , params . pop ( key ) ) return params
rewrite attributes to match the kwarg naming convention in client .