def METHOD_NAME(nodes_xyz: NDArray3float, nids: NDArrayNint,
                       xyz_compare: NDArray3float,
                       neq_max: int=1,
                       tol: Optional[float]=None,
                       msg: str='') -> NDArrayNint:
    """
    Finds the closest nodes to an arbitrary set of xyz points
    Parameters
    ----------
    nodes_xyz : (Nnodes, 3) float ndarray
        the source points (e.g., xyz_cid0)
    nids : (Nnodes, ) int ndarray
        the source node ids (e.g.; nid_cp_cid[:, 0])
    xyz_compare : (Ncompare, 3) float ndarray
        the xyz points to compare to; xyz_to_find
    tol : float; default=None
        the max spherical tolerance
        None : the whole model
    neq_max : int; default=1
        the number of "close" points
    msg : str; default=''
        custom message used for errors
    Returns
    -------
    nids_close: (Ncompare, ) int ndarray
        the close node ids
    """
    if not isinstance(neq_max, int):
        msgi = 'neq_max=%r must be an int; type=%s\n%s' % (
            neq_max, type(neq_max), msg)
        raise TypeError(msgi)
    #ieq = find_closest_nodes_index(nodes_xyz, xyz_compare, neq_max, tol)
    if tol is None:
        xyz_max = nodes_xyz.max(axis=0)
        xyz_min = nodes_xyz.min(axis=0)
        assert len(xyz_max) == 3, xyz_max
        dxyz = np.linalg.norm(xyz_max - xyz_min)
        tol = 2. * dxyz
    ieq = _not_equal_nodes_build_tree(nodes_xyz, xyz_compare, tol,
                                      neq_max=neq_max, msg=msg)[1]
    ncompare = xyz_compare.shape[0]
    assert len(ieq) == ncompare, 'increase the tolerance so you can find nodes; tol=%r' % tol
    try:
        nids_out = nids[ieq]
    except IndexError:
        # if you get a crash while trying to create the error message
        # check to see if your nodes are really far from each other
        #
        nnids = len(nids)
        msgi = 'Cannot find:\n'
        for i, ieqi, nid in zip(count(), ieq, nids):
            if ieqi == nnids:
                xyz = xyz_compare[i, :]
                msgi += '  nid=%s xyz=%s\n' % (nid, xyz)
        msgi += msg
        raise IndexError(msgi)
    return nids_out