def METHOD_NAME(pip_root, bazel_root):
    """Verifies all expected files are packaged into Pip.
    Args:
      pip_root: Root directory of code being packaged into pip.
      bazel_root: Root directory of Keras Bazel workspace.
    Raises:
      PipPackagingError: Missing file in pip.
    """
    for path, _, files in os.walk(bazel_root):
        if any(d for d in PIP_EXCLUDED_DIRS if d in path):
            # Skip any directories that are exclude from PIP, eg tests.
            continue
        python_files = set(fnmatch.filter(files, "*.py"))
        python_test_files = set(fnmatch.filter(files, "*test.py"))
        python_benchmark_files = set(fnmatch.filter(files, "*benchmark.py"))
        # We only care about python files in the pip package, see
        # create_init_files.
        files = python_files - python_test_files - python_benchmark_files
        for f in files:
            pip_path = os.path.join(
                pip_root, os.path.relpath(path, bazel_root), f
            )
            file_name = os.path.join(path, f)
            path_exists = os.path.exists(pip_path)
            file_excluded = file_name.lstrip("./") in PIP_EXCLUDED_FILES
            if not path_exists and not file_excluded:
                raise PipPackagingError(
                    "Pip package missing the file %s. If this is expected, "
                    "add it to PIP_EXCLUDED_FILES in "
                    "create_pip_helper.py. Otherwise, "
                    "make sure it is a build dependency of the pip package"
                    % file_name
                )
            if path_exists and file_excluded:
                raise PipPackagingError(
                    f"File in PIP_EXCLUDED_FILES included in pip. {file_name}"
                )