def get_neighbors(nodeid, adjmatrix):
    """returns all the direct neighbors of nodeid in the graph

    Args:
        nodeid: index of the datapoint
        adjmatrix: adjmatrix with true=edge, false=noedge

    Returns:
        list of neighbors and the number of neighbors
    """
    neighbors = []
    num = 0

    for i in range(0, adjmatrix.shape[0], 1):
        if adjmatrix[i][nodeid]:
            neighbors.append(i)
            num += 1

    return neighbors, num