code: def normalize_safety_settings(
      settings: SafetySettingOptions,
      harm_category_set,
  ) -> list[SafetySettingDict] | None:
      if settings is None:
          return None
      if isinstance(settings, Mapping):
          return [
              {
                  "category": to_harm_category(key, harm_category_set),
                  "threshold": to_block_threshold(value),
              }
              for key, value in settings.items()
          ]
      else:
          return [
              {
                  "category": to_harm_category(
                      d["category"], harm_category_set
                  ),
                  "threshold": to_block_threshold(d["threshold"]),
              }
              for d in settings
          ]
  
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 9 for calling a global function with example usage: normalize_safety_settings(settings, harm_category_set) and returns: None, unknown, unknown