docs: def compute_diffusion_maps(lapl_type, diffusion_map, lambdas, diffusion_time):
      """ Credit to Satrajit Ghosh (http://satra.cogitatum.org/) for final steps """
      # Check that diffusion maps is using the correct laplacian, warn otherwise
      if lapl_type not in ['geometric', 'renormalized']:
          warnings.warn("for correct diffusion maps embedding use laplacian type 'geometric' or 'renormalized'.")
      # Step 5 of diffusion maps:
      vectors = diffusion_map.copy()
      psi = vectors/vectors[:,[0]]
      diffusion_times = diffusion_time
      if diffusion_time == 0:
          lambdas = np.abs(lambdas)
          diffusion_times = np.exp(1. -  np.log(1 - lambdas[1:])/np.log(lambdas[1:]))
          lambdas = lambdas / (1 - lambdas)
      else:
          lambdas = np.abs(lambdas)
          lambdas = lambdas ** float(diffusion_time)
      diffusion_map = psi * lambdas
      return diffusion_map