def get_knot_name_from_nodeindep_list(nodeindep_list, x, y, tol=10e-3):
    """
    Gets the name of a knot by the x and y position
    :param nodeindep_list: list of knots to search in
    :param x: x-position of searched knot
    :param y: y-position of searched knot
    :param tol: accuracy the knot shell be searched
    :return: name of the knot if found, else None
    """
    x_ind = []
    y_ind = []
    for i in range(len(nodeindep_list.data['type'])):
        if abs(nodeindep_list.data['x'][i] - x) <= tol:
            x_ind.append(i)
    if x_ind:
        for i in range(len(nodeindep_list.data['type'])):
            if abs(nodeindep_list.data['y'][i] - y) <= tol:
                y_ind.append(i)
    ind = [el for el in x_ind if el in y_ind]
    if len(ind) >= 1:
        # print("Node found: " + str(nodeindep_list.data['name'][ind[0]]))
        return nodeindep_list.data['name'][ind[0]]
    else:
        return None