code: def manage_presets(
      load_preset: Optional[str],
      save_preset: bool,
      update_preset: Optional[str],
      layers: Dict[str, dict],
      style: Dict[str, dict],
      circle: Optional[bool],
      radius: Optional[Union[float, bool]],
      dilate: Optional[Union[float, bool]],
  ) -> Tuple[
      dict,
      dict,
      Optional[float],
      Optional[Union[float, bool]],
      Optional[Union[float, bool]],
  ]:
      """_summary_
  
      Args:
          load_preset (Optional[str]): Load preset named 'load_preset', if provided
          save_preset (Optional[str]): Save preset to file named 'save_preset', if provided
          update_preset (Optional[str]): Load, update and save preset named 'update_preset', if provided
          layers (Dict[str, dict]): prettymaps.plot() 'layers' parameter dict
          style (Dict[str, dict]): prettymaps.plot() 'style' parameter dict
          circle (Optional[bool]): prettymaps.plot() 'circle' parameter
          radius (Optional[Union[float, bool]]): prettymaps.plot() 'radius' parameter
          dilate (Optional[Union[float, bool]]): prettymaps.plot() 'dilate' parameter
  
      Returns:
          Tuple[dict, dict, Optional[float], Optional[Union[float, bool]], Optional[Union[float, bool]]]: Updated layers, style, circle, radius, dilate parameters
      """
  
      # Update preset mode: load a preset, update it with additional parameters and update the JSON file
      if update_preset:
          load_preset = save_preset = True
  
      # Load preset (if provided)
      if load_preset:
          layers, style, circle, radius, dilate = override_preset(
              load_preset, layers, style, circle, radius, dilate
          )
  
      # Save parameters as preset
      if save_preset:
          create_preset(
              save_preset,
              layers=layers,
              style=style,
              circle=circle,
              radius=radius,
              dilate=dilate,
          )
  
      return layers, style, circle, radius, dilate
  
imports: import re
  import os
  import json
  import yaml
  import pathlib
  import warnings
  import matplotlib
  import shapely.ops
  import numpy
  import osmnx
  import pandas
  import geopandas
  import shapely.affinity
  from copy import deepcopy
  from .fetch import get_gdfs
  from dataclasses import dataclass
  from matplotlib import pyplot
  from matplotlib.colors import hex2color
  from matplotlib.patches import Path, PathPatch
  from typing import Optional, Union, Tuple, List, Dict, Any, Iterable
  from shapely.geometry.base import BaseGeometry
  from shapely.geometry import Point, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, box
label_desc: Use image node_id 17 for calling a global function with example usage: manage_presets(load_preset, save_preset, update_preset, layers, style, circle, radius, dilate) and returns: layers,  style,  circle,  radius,  dilate