code: def convert_setting_to_enum(setting: dict) -> SafetySettingDict:
      return {
          "category": HarmCategory(setting["category"]),
          "threshold": HarmBlockThreshold(setting["threshold"]),
      }
  
imports: from __future__ import annotations
  from collections.abc import Mapping
  import typing
  from typing import Dict, Iterable, List, Union
  from typing_extensions import TypedDict
  from google.ai import generativelanguage
  from google.generativeai import string_utils
label_desc: Use image node_id 10 for calling a global function with example usage: convert_setting_to_enum(setting) and returns: dict