code: def test_solarize_threshold_above_bound(threshold, dtype, device):
      make_img = (
          torch.rand
          if dtype.is_floating_point
          else partial(torch.randint, 0, torch.iinfo(dtype).max)
      )
      img = make_img((3, 12, 23), dtype=dtype, device=device)
      with pytest.raises(
          TypeError, match="Threshold should be less than bound of img."
      ):
          F_t.solarize(img, threshold)
  
imports: import colorsys
  import itertools
  import math
  import os
  from functools import partial
  from typing import Sequence
  import numpy
  import PIL.Image
  import pytest
  import torch
  import torchvision.transforms
  import torchvision.transforms._functional_pil
  import torchvision.transforms._functional_tensor
  import torchvision.transforms.functional
  from common_utils import _assert_approx_equal_tensor_to_pil, _assert_equal_tensor_to_pil, _create_data, _create_data_batch, _test_fn_on_batch, assert_equal, cpu_and_cuda, needs_cuda
  from torchvision.transforms import InterpolationMode
label_desc: Use image node_id 17 for calling a global function with example usage: test_solarize_threshold_above_bound(threshold, dtype, device) without return types