code: def weighted_jaccard(x, y):
      """
      Compute the weighted Jaccard distance between between two
      dictionaries. Suppose :math:`K_x` and :math:`K_y` are the sets of
      keys from the two input dictionaries, while :math:`x_k` and
      :math:`y_k` are the values associated with key :math:`k` in the
      respective dictionaries. Typically these values are counts, i.e. of
      words or n-grams.
  
      .. math::
  
          D(x, y) = 1 - \\frac{\\sum_{k \\in K_x \\cup K_y} \\min\\{x_k, y_k\\}}
          {\\sum_{k \\in K_x \\cup K_y} \\max\\{x_k, y_k\\}}
  
      Parameters
      ----------
      x : dict
          First input dictionary.
  
      y : dict
          Second input dictionary.
  
      Returns
      -------
      out : float
          Weighted jaccard distance between `x` and `y`.
  
      Notes
      -----
      - If a key is missing in one of the two dictionaries, it is assumed
        to have value 0.
  
      References
      ----------
      - Weighted Jaccard distance: Chierichetti, F., et al. (2010)
        `Finding the Jaccard Median
        <http://theory.stanford.edu/~sergei/papers/soda10-jaccard.pdf>`_.
        Proceedings of the Twenty-First Annual ACM-SIAM Symposium on
        Discrete Algorithms. Society for Industrial and Applied
        Mathematics.
  
      Examples
      --------
      >>> tc.distances.weighted_jaccard({'a': 2, 'c': 4},
      ...                               {'b': 3, 'c': 12})
      0.7647058823529411
      """
      return _tc.extensions._distances.weighted_jaccard(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 10 for calling a global function with example usage: weighted_jaccard(x, y) and returns: _tc