def METHOD_NAME(obj):
    if isinstance(obj, list):
        return [
            METHOD_NAME(package)
            for package in obj
            if package["key"] not in BAD_PACKAGES
        ]
    else:
        obj["dependencies"] = METHOD_NAME(obj["dependencies"])
        return obj