code: def convert_base64_to_data_uri(base64_image):
      def _get_mime_type_from_data_uri(base64_image):
          # Decode the base64 string
          image_data = base64.b64decode(base64_image)
          # Check the first few bytes for known signatures
          if image_data.startswith(b"\xff\xd8\xff"):
              return "image/jpeg"
          elif image_data.startswith(b"\x89PNG\r\n\x1a\n"):
              return "image/png"
          elif image_data.startswith(
              b"GIF87a"
          ) or image_data.startswith(b"GIF89a"):
              return "image/gif"
          elif (
              image_data.startswith(b"RIFF")
              and image_data[8:12] == b"WEBP"
          ):
              return "image/webp"
          return (
              "image/jpeg"  # use jpeg for unknown formats, best guess.
          )
  
      mime_type = _get_mime_type_from_data_uri(base64_image)
      data_uri = f"data:{mime_type};base64,{base64_image}"
      return data_uri
  
file_path: autogen/autogen/agentchat/contrib/img_utils.py
imports: import base64
  import mimetypes
  import re
  from io import BytesIO
  from typing import Any, Dict, List, Optional, Tuple, Union
  import requests
  from PIL import Image
label_desc: Use image node_id 3 for calling a global function with example usage: convert_base64_to_data_uri(base64_image) and returns: data_uri, str, str, str, str, str