code: def extract_exif(image: Image) -> dict:
      """
  
      Args:
          image:
  
      Returns:
  
      """
      try:
          exif_data = image._getexif()
          if exif_data is not None:
              exif = {
                  ExifTags.TAGS[k]: decode_byte_exif(v)
                  for k, v in exif_data.items()
                  if k in ExifTags.TAGS
              }
          else:
              exif = {}
      except (AttributeError, OSError):
          # Not all file types (e.g. .gif) have exif information.
          exif = {}
  
      return exif
  
imports: import imghdr
  from functools import partial
  from pathlib import Path
  from typing import Optional, Tuple, Union
  import imagehash
  import pandas
  from PIL import ExifTags, Image
  from ydata_profiling.config import Settings
  from ydata_profiling.model.summary_algorithms import describe_image_1d, named_aggregate_summary
  from ydata_profiling.utils.imghdr_patch import *
label_desc: Use image node_id 6 for calling a global function with example usage: extract_exif(image) and returns: exif