code: def adjust_sharpness(img: Tensor, sharpness_factor: float) -> Tensor:
      if sharpness_factor < 0:
          raise ValueError(
              f"sharpness_factor ({sharpness_factor}) is not non-negative."
          )
  
      _assert_image_tensor(img)
  
      _assert_channels(img, [1, 3])
  
      if img.size(-1) <= 2 or img.size(-2) <= 2:
          return img
  
      return _blend(
          img, _blurred_degenerate_image(img), sharpness_factor
      )
  
imports: import warnings
  from typing import List, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn.functional import conv2d, grid_sample, interpolate, pad
label_desc: Use image node_id 42 for calling a global function with example usage: adjust_sharpness(img, sharpness_factor) and returns: _blend, img