def get_node_dynamic_info(node, pre_states, neighbours):
    """This function is an auxiliary function which performs the computation
    of the previous dynamics needed to compute the next state.

    Parameters
    ----------
    node: int
        the index of the given node.
    pre_states: array_like, shape (N, M)
        the previous states of the system.
    neighbours: list
        the indices of the neighbours.

    Returns
    -------
    pre_states_node: array_like, shape (N0,1)
        the previous states of the given node.
    pre_states_neig: array_like, shape (N0,M0)
        the previous states of the neigbours.

    """

    # previous states
    pre_states_neig = pre_states[:, neighbours]
    pre_states_node = pre_states[:, node]
    return pre_states_node, pre_states_neig