code: def _convert_dict(d: Mapping) -> glm.Content | glm.Part | glm.Blob:
      if is_content_dict(d):
          content = dict(d)
          content["parts"] = [
              to_part(part) for part in content["parts"]
          ]
          return glm.Content(content)
      elif is_part_dict(d):
          part = dict(d)
          if "inline_data" in part:
              part["inline_data"] = to_blob(part["inline_data"])
          return glm.Part(part)
      elif is_blob_dict(d):
          blob = d
          return glm.Blob(blob)
      else:
          raise KeyError(
              "Could not recognize the intended type of the `dict`. "
              "A `Content` should have a 'parts' key. "
              "A `Part` should have a 'inline_data' or a 'text' key. "
              "A `Blob` should have 'mime_type' and 'data' keys. "
              f"Got keys: {list(d.keys())}"
          )
  
imports: from __future__ import annotations
  from collections.abc import Iterable, Mapping
  import io
  import mimetypes
  import pathlib
  import typing
  from typing import Any, TypedDict, Union
  from google.ai import generativelanguage
label_desc: Use image node_id 3 for calling a global function with example usage: _convert_dict(d) and returns: glm, glm, glm