code: def dot_product(x, y):
      """
      Compute the dot_product between two dictionaries or two lists of
      equal length. Suppose `x` and `y` each contain :math:`d` variables:
  
      .. math:: D(x, y) = \\frac{1}{\\sum_i^d x_i y_i}
  
      .. warning::
  
          The 'dot_product' distance is deprecated and will be removed in future
          versions of Turi Create. Please use 'transformed_dot_product'
          distance instead, although note that this is more than a name change; it
          is a *different* transformation of the dot product of two vectors.
          Please see the distances module documentation for more details.
  
      Parameters
      ----------
      x : dict or list
          First input vector.
  
      y : dict or list
          Second input vector.
  
      Returns
      -------
      out : float
  
      Notes
      -----
      - If the input vectors are in dictionary form, keys missing in one
        of the two dictionaries are assumed to have value 0.
  
      - Dot product distance is not a metric. This means the ball tree
        cannot be used to compute nearest neighbors based on this distance.
  
      Examples
      --------
      >>> tc.distances.dot_product([1, 2, 3], [4, 5, 6])
      0.03125
      ...
      >>> tc.distances.dot_product({'a': 2, 'c': 4}, {'b': 3, 'c': 12})
      0.020833333333333332
      """
      return _tc.extensions._distances.dot_product(x, y)
  
file_path: turicreate/src/python/turicreate/toolkits/distances/_distances.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
label_desc: Use image node_id 7 for calling a global function with example usage: dot_product(x, y) and returns: _tc