docs: def fit(self, X, y=None, input_type='data'):
          """Fit the model from data in X.
  
          Parameters
          ----------
          input_type : string, one of: 'data', 'distance'.
              The values of input data X. (default = 'data')
  
          X : array-like, shape (n_samples, n_features)
              Training vector, where n_samples in the number of samples
              and n_features is the number of features.
  
          If self.input_type is 'distance':
  
          X : array-like, shape (n_samples, n_samples),
              Interpret X as precomputed distance or adjacency graph
              computed from samples.
  
          eigen_solver : {None, 'arpack', 'lobpcg', or 'amg'}
              The eigenvalue decomposition strategy to use. AMG requires pyamg
              to be installed. It can be faster on very large, sparse problems,
              but may also lead to instabilities.
  
          Returns
          -------
          self : object
              Returns the instance itself.
          """
  
          X = self._validate_input(X, input_type)
          self.fit_geometry(X, input_type)
  
          if not hasattr(self, 'distance_matrix'):
              self.distance_matrix = None
          if not hasattr(self, 'graph_distance_matrix'):
              self.graph_distance_matrix = None
          if not hasattr(self, 'centered_matrix'):
              self.centered_matrix = None
  
          # don't re-compute these if it's already been done.
          # This might be the case if an eigendecompostion fails and a different sovler is selected
          if (self.distance_matrix is None and self.geom_.adjacency_matrix is None):
              self.distance_matrix = self.geom_.compute_adjacency_matrix()
          elif self.distance_matrix is None:
              self.distance_matrix = self.geom_.adjacency_matrix
          if self.graph_distance_matrix is None:
              self.graph_distance_matrix = graph_shortest_path(self.distance_matrix,
                                                               method = self.path_method,
                                                               directed = False)
          if self.centered_matrix is None:
              self.centered_matrix = center_matrix(self.graph_distance_matrix)
  
          self.embedding_ = isomap(self.geom_, n_components=self.n_components,
                                   eigen_solver=self.eigen_solver,
                                   random_state=self.random_state,
                                   path_method = self.path_method,
                                   distance_matrix = self.distance_matrix,
                                   graph_distance_matrix = self.graph_distance_matrix,
                                   centered_matrix = self.centered_matrix,
                                   solver_kwds = self.solver_kwds)
          return self