code: def test_pil_save(file_encoding, quality, expected_shape) -> None:
      opts = argparse.Namespace()
      setattr(
          opts,
          "image_augmentation.pil_save.file_encoding",
          file_encoding,
      )
      setattr(opts, "image_augmentation.pil_save.quality", quality)
  
      t = image_bytes.PILSave(opts)
  
      C, H, W = 3, 12, 12
      x = {
          "samples": torch.arange(C * H * W).view(C, H, W) / (C * H * W)
      }
      out = t(x)["samples"]
      assert out.shape == (expected_shape,)
  
file_path: ml-cvnets/tests/transforms/test_image_bytes.py
imports: import argparse
  from typing import Tuple
  import pytest
  import torch
  from data.transforms import image_bytes
label_desc: Use image node_id 1 for calling a global function with example usage: test_pil_save(file_encoding, quality, expected_shape) without return types