class_docstr: Configuration builder for WitWidget settings.
docstr: Sets a custom function for distance computation.
  
  WIT can directly use a custom function for all distance computations within
  the tool. In this case, the provided function should accept a query example
  proto and a list of example protos to compute the distance against and
  return a 1D list of numbers containing the distances.
  
  Args:
    distance_fn: The python function which will be used for distance
    computation.
  
  Returns:
    self, in order to enabled method chaining.
docstr_tok: ["Sets","a","custom","function","for","distance","computation",".","WIT","can","directly","use","a","custom","function","for","all","distance","computations","within","the","tool",".","In","this","case",",","the","provided","function","should","accept","a","query","example","proto","and","a","list","of","example","protos","to","compute","the","distance","against","and","return","a","1D","list","of","numbers","containing","the","distances",".","Args",":","distance_fn",":","The","python","function","which","will","be","used","for","distance","computation",".","Returns",":","self",",","in","order","to","enabled","method","chaining","."]
code: def set_custom_distance_fn(self, distance_fn):
      """Sets a custom function for distance computation.
  
      WIT can directly use a custom function for all distance computations within
      the tool. In this case, the provided function should accept a query example
      proto and a list of example protos to compute the distance against and
      return a 1D list of numbers containing the distances.
  
      Args:
        distance_fn: The python function which will be used for distance
        computation.
  
      Returns:
        self, in order to enabled method chaining.
      """
      if distance_fn is None:
          self.delete("custom_distance_fn")
      else:
          self.store("custom_distance_fn", distance_fn)
      return self
  
imports: import sys
  import tensorflow
label_desc: Use image node_id 27 for calling the WitConfigBuilder obj's underlying member method code with example usage: obj.set_custom_distance_fn(distance_fn) and returns: self