def split_dict(dic, *keys):
    for k in keys:
        if k not in dic:
            raise KeyError("key {0!r} is not in original mapping".format(k))
    r1 = {}
    r2 = {}
    for k, v in dic.items():
        if k in keys:
            r1[k] = v
        else:
            r2[k] = v
    return r1, r2
Get header data as a string.
dataset/ETHPy150Open mikeorr/WebHelpers2/webhelpers2/containers.py/split_dict--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/dev_appserver.py/AppServerResponse.header_data