code: def calc_default_image_properties(
      batch: List[np.ndarray], sample_n_pixels: int = 10000
  ) -> Dict[str, list]:
      """Speed up the calculation for the default image properties by sharing common actions."""
      if len(batch) == 0:
          return {}
      results_dict = {}
      sizes_array = _sizes_array(batch)
      results_dict["Aspect Ratio"] = list(
          sizes_array[:, 0] / sizes_array[:, 1]
      )
      results_dict["Area"] = list(sizes_array[:, 0] * sizes_array[:, 1])
  
      sampled_images = [
          sample_pixels(img, sample_n_pixels) for img in batch
      ]
  
      grayscale_images = [
          img if _is_grayscale(img) else rgb2gray(img) * 255
          for img in sampled_images
      ]
      results_dict["Brightness"] = [
          image.mean() for image in grayscale_images
      ]
      results_dict["RMS Contrast"] = [
          image.std() for image in grayscale_images
      ]
  
      rgb_intensities = _rgb_relative_intensity_mean_array(
          sampled_images
      )
      results_dict["Mean Red Relative Intensity"] = rgb_intensities[
          :, 0
      ].tolist()
      results_dict["Mean Green Relative Intensity"] = rgb_intensities[
          :, 1
      ].tolist()
      results_dict["Mean Blue Relative Intensity"] = rgb_intensities[
          :, 2
      ].tolist()
  
      return results_dict
  
imports: from typing import Dict, List, Tuple
  import numpy
  from cv2 import CV_64F, Laplacian
  from skimage.color import rgb2gray
label_desc: Use image node_id 18 for calling a global function with example usage: calc_default_image_properties(batch, sample_n_pixels) and returns: results_dict, dict