code: def _shared_features(adense, 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
docs: Number of features in ``adense`` that are also in ``bdense``.