def METHOD_NAME(data):
    if isinstance(data, dict):
        for k, v in data.items():
            if isinstance(k, bytes):
                key = k.decode('utf-8', 'replace')
            else:
                key = k
            key = key.lower()
            data[k] = METHOD_NAME(v)
            for blk in KEYS:
                if blk in key:
                    data[k] = MASK
    elif isinstance(data, list):
        for i, l in enumerate(list(data)):
            data[i] = METHOD_NAME(l)
    elif isinstance(data, str):
        if '=' in data:
            # at this point we've assumed it's a standard HTTP query
            # or cookie
            if '&' in data:
                delimiter = '&'
            else:
                delimiter = ';'
            qd = METHOD_NAME(OrderedDict(e.split('=', 1) if '=' in e else (e, None) for e in data.split(delimiter)))
            return delimiter.join((k + '=' + v if v is not None else k) for k, v in qd.items())
        if VALUES_RE.match(data):
            return MASK
    return data