code: def test(root):
      from einops import rearrange
  
      filter = DeepFloydDataFiltering(verbose=True)
      for p in os.listdir((root)):
          print(f"running on {p}...")
          img = load_img(os.path.join(root, p))
          filtered_img = filter(img)
          filtered_img = rearrange(
              255.0 * (filtered_img.numpy())[0], "c h w -> h w c"
          ).astype(np.uint8)
          Image.fromarray(filtered_img).save(
              os.path.join(
                  root, f"{os.path.splitext(p)[0]}-filtered.jpg"
              )
          )
  
file_path: generative-models/scripts/util/detection/nsfw_and_watermark_dectection.py
imports: import os
  import clip
  import numpy
  import torch
  import torchvision.transforms
  from PIL import Image
label_desc: Use image node_id 5 for calling a global function with example usage: test(root) without return types