def create(config, args):
    pp = pprint.PrettyPrinter()
    url = config['url'] + "/api/session/"

    data = {
       "name": args['name'],
       "description": args['description'],
       "upstreamHost": args['upstreamHost'],
       "upstreamPort": args['upstreamPort'],
    }

    if args['testplan'] is not None:
        data['testPlan'] = {"id": args['testplan']}

    if args['serverOverloadProfile'] is not None:
        data['serverOverloadProfile'] = {"id": args['serverOverloadProfile']}

    if args['qosProfile'] is not None:
        data['qosProfile'] = {"id": args['qosProfile']}

    token = auth.get_token(config)
    r = requests.post(url, data=json.dumps(data), headers={"X-Auth-Token": token})
    if r.status_code != 200:
        print((r.status_code) % "API returned status code %s")
        sys.exit(1)
    else:
        pp.pprint(json.loads(r.content))
dataset/ETHPy150Open emccode/heliosburn/heliosburn/hbcli/controllers/session.py/create/swapped operands of `%`