code: def sum_mappings(
      ds: Iterable[Mapping[K, V] | Iterable[tuple[K, V]]], /
  ) -> dict[K, V]:
      """Sum the values of the given mappings, key by key"""
      out: dict[K, V] = {}
      for d in ds:
          if isinstance(d, Mapping):
              d = d.items()
          for k, v in d:
              try:
                  out[k] += v  # type: ignore
              except KeyError:
                  out[k] = v
      return out
  
imports: from __future__ import annotations
  import heapq
  import itertools
  import weakref
  from collections import OrderedDict, UserDict
  from collections.abc import Callable, Hashable, Iterable, Iterator, Mapping, MutableSet
  from typing import Any, TypeVar, cast
label_desc: Use image node_id 1 for calling a global function with example usage: sum_mappings() and returns: out