code: def _brightness_contrast_adjust_non_uint(
      img, alpha=1, beta=0, beta_by_max=False
  ):
      dtype = img.dtype
      img = img.astype("float32")
  
      if alpha != 1:
          img *= alpha
      if beta != 0:
          if beta_by_max:
              max_value = MAX_VALUES_BY_DTYPE[dtype]
              img += beta * max_value
          else:
              img += beta * np.mean(img)
      return img
  
imports: from __future__ import division
  from typing import Optional, Sequence, Union
  from warnings import warn
  import cv2
  import numpy
  import skimage
  from albumentations import random_utils
  from albumentations.augmentations.utils import MAX_VALUES_BY_DTYPE, _maybe_process_in_chunks, clip, clipped, ensure_contiguous, is_grayscale_image, is_rgb_image, non_rgb_warning, preserve_channel_dim, preserve_shape
label_desc: Use image node_id 31 for calling a global function with example usage: _brightness_contrast_adjust_non_uint(img, alpha, beta, beta_by_max) and returns: img