def get_node_msindex(msinds, node_seed):
    """
    Convert seeds-like selection of voxel to multiscale index.
    :param msinds: ndarray with indexes
    :param node_seed: ndarray with 1 where selected pixel is, or list of indexes in this array
    :return: multiscale index of first found seed
    """
    if type(node_seed) == np.ndarray:
        seed_indexes = np.nonzero(node_seed)
    elif type(node_seed) == list:
        seed_indexes = node_seed
    else:
        seed_indexes = [node_seed]

    selected_nodes_msinds = msinds[seed_indexes]
    node_msindex = selected_nodes_msinds[0]
    return node_msindex