parameters: (cls, inputs, clusters, distance_metric)
docstring: Computes distance between each input and each cluster center.
  
      Args:
        inputs: list of input Tensors.
        clusters: cluster Tensor.
        distance_metric: distance metric used for clustering
  
      Returns:
        list of Tensors, where each element corresponds to each element in inputs.
        The value is the distance of each row to all the cluster centers.
        Currently only Euclidean distance and cosine distance are supported.
docstring_summary: Computes distance between each input and each cluster center.
docstring_tokens: Computes distance between each input and each cluster center .
function: def _distance_graph(cls, inputs, clusters, distance_metric):
      """Computes distance between each input and each cluster center.
  
      Args:
        inputs: list of input Tensors.
        clusters: cluster Tensor.
        distance_metric: distance metric used for clustering
  
      Returns:
        list of Tensors, where each element corresponds to each element in inputs.
        The value is the distance of each row to all the cluster centers.
        Currently only Euclidean distance and cosine distance are supported.
      """
      assert isinstance(inputs, list)
      if distance_metric == SQUARED_EUCLIDEAN_DISTANCE:
        return cls._compute_euclidean_distance(inputs, clusters)
      elif distance_metric == COSINE_DISTANCE:
        return cls._compute_cosine_distance(inputs, clusters,
                                            inputs_normalized=True)
      else:
        assert False, ('Unsupported distance metric passed to Kmeans %s'
                       % str(distance_metric))
function_tokens: def _distance_graph ( cls , inputs , clusters , distance_metric ) : assert isinstance ( inputs , list ) if distance_metric == SQUARED_EUCLIDEAN_DISTANCE : return cls . _compute_euclidean_distance ( inputs , clusters ) elif distance_metric == COSINE_DISTANCE : return cls . _compute_cosine_distance ( inputs , clusters , inputs_normalized = True ) else : assert False , ( 'Unsupported distance metric passed to Kmeans %s' % str ( distance_metric ) )