<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prior_neighbor(C, alpha=0.001):
 r"""Neighbor prior for the given count matrix. Parameters C : (M, M) ndarray or scipy.sparse matrix Count matrix alpha : float (optional) Value of prior counts Returns ------- B : (M, M) ndarray or scipy.sparse matrix Prior count matrix Notes ------ The neighbor prior :math:`b_{ij}` is defined as .. math:: b_{ij}=\left \{ \begin{array}{rl} \alpha & c_{ij}+c_{ji}>0 \\ 0 & \text{else} \end{array} \right . Examples -------- array([[ 0.001, 0.001, 0. ], [ 0.001, 0. , 0.001], [ 0. , 0.001, 0.001]]) """


    if isdense(C):
        B = sparse.prior.prior_neighbor(csr_matrix(C), alpha=alpha)
        return B.toarray()
    else:
        return sparse.prior.prior_neighbor(C, alpha=alpha)