def format_payload(enc, **kwargs):
 payload = {'enc': enc}
 load = {}
 for key in kwargs:
  load[key] = kwargs[key]
 payload['load'] = load
 return package(payload)

def format_payload ( enc , ** kwargs ) : payload = { 'enc' : enc } load = { } for key in kwargs : load [ key ] = kwargs [ key ] payload [ 'load' ] = load return package ( payload )
pass in the required arguments for a payload .