(input_attributes, target_attributes)
return closest_matches
:param input_attributes:    First dictionary of objects to attribute tuples.
    :param target_attributes:   Second dictionary of blocks to attribute tuples.
    :returns:                   A dictionary of objects in the input_attributes to the closest objects in the
                                target_attributes.
:param input_attributes:    First dictionary of objects to attribute tuples.
    :param target_attributes:   Second dictionary of blocks to attribute tuples.
    :returns:                   A dictionary of objects in the input_attributes to the closest objects in the
                                target_attributes.
: param input_attributes : First dictionary of objects to attribute tuples . : param target_attributes : Second dictionary of blocks to attribute tuples . : returns : A dictionary of objects in the input_attributes to the closest objects in the target_attributes .
def _get_closest_matches(input_attributes, target_attributes):
    """
    :param input_attributes:    First dictionary of objects to attribute tuples.
    :param target_attributes:   Second dictionary of blocks to attribute tuples.
    :returns:                   A dictionary of objects in the input_attributes to the closest objects in the
                                target_attributes.
    """
    closest_matches = {}

    # for each object in the first set find the objects with the closest target attributes
    for a in input_attributes:
        best_dist = float('inf')
        best_matches = []
        for b in target_attributes:
            dist = _euclidean_dist(input_attributes[a], target_attributes[b])
            if dist < best_dist:
                best_matches = [b]
                best_dist = dist
            elif dist == best_dist:
                best_matches.append(b)
        closest_matches[a] = best_matches

    return closest_matches
def _get_closest_matches ( input_attributes , target_attributes ) : closest_matches = { } # for each object in the first set find the objects with the closest target attributes for a in input_attributes : best_dist = float ( 'inf' ) best_matches = [ ] for b in target_attributes : dist = _euclidean_dist ( input_attributes [ a ] , target_attributes [ b ] ) if dist < best_dist : best_matches = [ b ] best_dist = dist elif dist == best_dist : best_matches . append ( b ) closest_matches [ a ] = best_matches return closest_matches