code: def test_layers_type(tmp_path):
      outfile = str(tmp_path / "temp_layers.jp2")
      for quality_layers in [[100, 50, 10], (100, 50, 10), None]:
          test_card.save(outfile, quality_layers=quality_layers)
  
      for quality_layers in ["quality_layers", ("100", "50", "10")]:
          with pytest.raises(ValueError):
              test_card.save(outfile, quality_layers=quality_layers)
  
imports: from __future__ import annotations
  import os
  import re
  from io import BytesIO
  import pytest
  from PIL import Image, ImageFile, Jpeg2KImagePlugin, UnidentifiedImageError, _binary, features
  from .helper import assert_image_equal, assert_image_similar, assert_image_similar_tofile, skip_unless_feature, skip_unless_feature_version
label_desc: Use image node_id 21 for calling a global function with example usage: test_layers_type(tmp_path) without return types