code: def on_before_image_saved(callback):
      """register a function to be called before an image is saved to a file.
      The callback is called with one argument:
          - params: ImageSaveParams - parameters the image is to be saved with. You can change fields in this object.
      """
      add_callback(
          callback_map["callbacks_before_image_saved"], callback
      )
  
imports: import inspect
  import os
  from collections import namedtuple
  from typing import Optional, Any
  from fastapi import FastAPI
  from gradio import Blocks
  from modules import errors, timer
label_desc: Use image node_id 32 for calling a global function with example usage: on_before_image_saved(callback) without return types