code: def convert_filters_to_enums(
      filters: Iterable[dict],
  ) -> List[ContentFilterDict]:
      result = []
      for f in filters:
          f = f.copy()
          f["reason"] = BlockedReason(f["reason"])
          f = typing.cast(ContentFilterDict, f)
          result.append(f)
      return result
  
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 5 for calling a global function with example usage: convert_filters_to_enums(filters) and returns: result