def _massage_metakeys(dct, prfx):
    """
    Returns a copy of the supplied dictionary, prefixing any keys that do
    not begin with the specified prefix accordingly.
    """
    lowprefix = prfx.lower()
    ret = {}
    for k, v in list(dct.items()):
        if not k.lower().startswith(lowprefix):
            k = "%s%s" % (prfx, k)
        ret[k] = v
    return ret
dataset/ETHPy150Open rackspace/pyrax/pyrax/object_storage.py/_massage_metakeys/original