code: def adjust_contrast(tens: Tensor, contrast_factor: float) -> Tensor:
      """
          Adjust contrast of an image.
  
      Args:
          tens (Tensor): Any valid ``caer.Tensor``.
          contrast_factor (float): How much to adjust the contrast. Can be any
              non negative number. 0 gives a solid gray image, 1 gives the
              original image while 2 increases the contrast by a factor of 2.
      Returns:
          ``caer.Tensor``: Contrast adjusted image.
      """
      # It's much faster to use the LUT construction because you have to change dtypes multiple times
      tens = to_tensor(tens, enforce_tensor=True)
      cspace = tens.cspace
  
      table = (
          np.array(
              [(i - 74) * contrast_factor + 74 for i in range(0, 256)]
          )
          .clip(0, 255)
          .astype("uint8")
      )
  
      try:
          from PIL import ImageEnhance
      except ImportError:
          raise ImportError(
              "Pillow must be installed to use ``caer.color.adjust_saturation()``."
          )
  
      enhancer = ImageEnhance.Contrast(tens)
      tens = enhancer.enhance(contrast_factor)
      tens = cv.LUT(tens, table)
      return to_tensor(tens, cspace=cspace)
  
file_path: caer/caer/transforms/color.py
imports: import numpy
  import random
  import cv2
  import math
  from ..coreten import Tensor, to_tensor
  from ..annotations import Union, List, Tuple
  from .functional import is_list, _hls, _exposure_process
label_desc: Use image node_id 5 for calling a global function with example usage: adjust_contrast(tens, contrast_factor) and returns: to_tensor