'Set ``self._period`` and ``self._cyclic_components_proj``.
Use the algorithm described in:
J. P. Jarvis and D. R. Shier,
"Graph-Theoretic Analysis of Finite Markov Chains," 1996.'

def _compute_period(self):

    if (self.n == 1):
        if (self.csgraph[(0, 0)] == 0):
            self._period = 1
            self._cyclic_components_proj = np.zeros(self.n, dtype=int)
            return None
        else:
            self._period = 1
            self._cyclic_components_proj = np.zeros(self.n, dtype=int)
            return None
    if (not self.is_strongly_connected):
        raise NotImplementedError('Not    defined    for    a    non    strongly-connected    digraph')
    if np.any((self.csgraph.diagonal() > 0)):
        self._period = 1
        self._cyclic_components_proj = np.zeros(self.n, dtype=int)
        return None
    (node_order, predecessors) = csgraph.breadth_first_order(self.csgraph, i_start=0)
    bfs_tree_csr = csgraph.reconstruct_path(self.csgraph, predecessors)
    non_bfs_tree_csr = (self.csgraph - bfs_tree_csr)
    non_bfs_tree_csr.eliminate_zeros()
    level = np.zeros(self.n, dtype=int)
    for i in range(1, self.n):
        level[node_order[i]] = (level[predecessors[node_order[i]]] + 1)
    d = 0
    for (node_from, node_to) in _csr_matrix_indices(non_bfs_tree_csr):
        value = ((level[node_from] - level[node_to]) + 1)
        d = gcd(d, value)
        if (d == 1):
            self._period = 1
            self._cyclic_components_proj = np.zeros(self.n, dtype=int)
            return None
    self._period = d
    self._cyclic_components_proj = (level % d)
