code: def chain_dot(*xs):
      """Returns the dot product of multiple vectors represented as dicts.
  
      Parameters
      ----------
      xs
  
      Examples
      --------
  
      >>> from river import utils
  
      >>> x = {'x0': 1, 'x1': 2, 'x2': 1}
      >>> y = {'x1': 21, 'x2': 3}
      >>> z = {'x1': 2, 'x2': 1 / 3}
  
      >>> utils.math.chain_dot(x, y, z)
      85.0
  
      """
      keys = min(xs, key=len)
      return sum(prod(x.get(i, 0) for x in xs) for i in keys)
  
imports: from __future__ import annotations
  import functools
  import itertools
  import math
  import operator
  import numpy
  import scipy
label_desc: Use image node_id 8 for calling a global function with example usage: chain_dot() and returns: sum