code: def _gen_input_casting_func_for_map(
      sig: dict[str, t.Any]
  ) -> t.Callable[
      [ONNXArgMapType], dict[ONNXArgMapKeyType, ONNXArgCastedType]
  ]:
      map_value_sig = t.cast(dict[str, t.Any], sig["valueType"])
      value_casting_func = _gen_input_casting_func(map_value_sig)
  
      def _mapping(
          item: ONNXArgMapType,
      ) -> dict[ONNXArgMapKeyType, t.Any]:
          new_item = {k: value_casting_func(v) for k, v in item.items()}
          return new_item
  
      return _mapping
  
file_path: BentoML/grpc-client/bentoml/_internal/frameworks/utils/onnx.py
imports: from __future__ import annotations
  import logging
  import typing
  from typing import TYPE_CHECKING
  from ....exceptions import BentoMLException
  from ...types import LazyType
  from ...utils.lazy_loader import LazyLoader
label_desc: Use image node_id 4 for calling a global function with example usage: _gen_input_casting_func_for_map(sig) and returns: _mapping, new_item