def METHOD_NAME(json, value, replacement):
    """
    Substitute any pair whose value is 'value' with the replacement
    JSON 'replacement'.  Based on json_decomment().
    """
    if isinstance(json, dict):
        result = {}
        for item in json:
            if json[item] == value:
                result[item] = replacement
            else:
                result[item] = METHOD_NAME(json[item], value, replacement)
        return result
    elif isinstance(json, list):
        result = []
        for item in json:
            result.append(METHOD_NAME(item, value, replacement))
        return result
    else:
        return json