code: def fit_transform(self, X, y=None):
          
          X = self._check_array(X)
          if self.algorithm not in {"tsqr", "randomized"}:
              raise ValueError()
          if self.algorithm == "tsqr":
              u, s, v = da.linalg.svd(X)
              u = u[:, : self.n_components]
              s = s[: self.n_components]
              v = v[: self.n_components]
          else:
              u, s, v = da.linalg.svd_compressed(
                  X, self.n_components, self.n_iter, seed=self.random_state
              )
          u, v = svd_flip(u, v)
  
          X_transformed = u * s
          explained_var = X_transformed.var(axis=0)
          full_var = X.var(axis=0).sum()
          explained_variance_ratio = explained_var / full_var
  
          components, ev, evr, sv = compute(v, explained_var, explained_variance_ratio, s)
          self.components_ = components
          self.explained_variance_ = ev
          self.explained_variance_ratio_ = evr
          self.singular_values_ = sv
          return X_transformed
docs: Fit model to X and perform dimensionality reduction on X.
  
          Parameters
          ----------
          X : array-like, shape (n_samples, n_features)
              Training data.
  
          y : Ignored
  
          Returns
          -------
          X_new : array, shape (n_samples, n_components)
              Reduced version of X. This will always be a dense array, of the
              same type as the input array. If ``X`` was a ``dask.array``, then
              ``X_new`` will be a ``dask.array`` with the same chunks along the
              first dimension.