code: def reset_local_connectivity(simplicial_set):
      
      simplicial_set = normalize(simplicial_set, norm="max")
      transpose = simplicial_set.transpose()
      prod_matrix = simplicial_set.multiply(transpose)
      simplicial_set = simplicial_set + transpose - prod_matrix
      simplicial_set.eliminate_zeros()
  
      return simplicial_set
docs: Reset the local connectivity requirement -- each data sample should
      have complete confidence in at least one 1-simplex in the simplicial set.
      We can enforce this by locally rescaling confidences, and then remerging the
      different local simplicial sets together.
  
      Parameters
      ----------
      simplicial_set: sparse matrix
          The simplicial set for which to recalculate with respect to local
          connectivity.
  
      Returns
      -------
      simplicial_set: sparse_matrix
          The recalculated simplicial set, now with the local connectivity
          assumption restored.