<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _shared_features(adense, bdense):
 """ Number of features in ``adense`` that are also in ``bdense``. """

    a_indices = set(nonzero(adense))
    b_indices = set(nonzero(bdense))

    shared = list(a_indices & b_indices)
    diff = list(a_indices - b_indices)
    Ndiff = len(diff)

    return Ndiff