def get_samples_at_node(node_id, nodes_to_samples):
    """
    Return an array containing the ids of the samples for node `node_id`.

    This method requires the user to
     - first compute the decision path for the sample matrix X
     - then convert it to a csc

    >>> samples_to_nodes = estimator.decision_path(X)  # returns a Scipy compressed sparse row matrix (CSR)
    >>> nodes_to_samples = samples_to_nodes.tocsc()    # we need the column equivalent (CSC)
    >>> samples = get_samples_at_node(node_id, nodes_to_samples)

    Parameters
    ----------
    node_id : int
        The node for which the list of samples is queried.
    nodes_to_samples : csc_matrix
        A boolean matrix in Compressed Sparse Column (CSC) format where rows are the
        tree nodes and columns are samples. The matrix contains a 1 when the samples
        go through this node when processed by the decisions.

    Returns
    -------

    """
    return nodes_to_samples.indices[nodes_to_samples.indptr[node_id] : nodes_to_samples.indptr[node_id + 1]]