code: def fit(
          self,
          interactions,
          user_features=None,
          item_features=None,
          sample_weight=None,
          epochs=1,
          num_threads=1,
          verbose=False,
      ):
          
  
          # Discard old results, if any
          self._reset_state()
  
          return self.fit_partial(
              interactions,
              user_features=user_features,
              item_features=item_features,
              sample_weight=sample_weight,
              epochs=epochs,
              num_threads=num_threads,
              verbose=verbose,
          )
docs: Fit the model.
  
          For details on how to use feature matrices, see the documentation
          on the :class:`lightfm.LightFM` class.
  
          Arguments
          ---------
  
          interactions: np.float32 coo_matrix of shape [n_users, n_items]
               the matrix containing
               user-item interactions. Will be converted to
               numpy.float32 dtype if it is not of that type.
          user_features: np.float32 csr_matrix of shape [n_users, n_user_features], optional
               Each row contains that user's weights over features.
          item_features: np.float32 csr_matrix of shape [n_items, n_item_features], optional
               Each row contains that item's weights over features.
          sample_weight: np.float32 coo_matrix of shape [n_users, n_items], optional
               matrix with entries expressing weights of individual
               interactions from the interactions matrix.
               Its row and col arrays must be the same as
               those of the interactions matrix. For memory
               efficiency its possible to use the same arrays
               for both weights and interaction matrices.
               Defaults to weight 1.0 for all interactions.
               Not implemented for the k-OS loss.
          epochs: int, optional
               number of epochs to run
          num_threads: int, optional
               Number of parallel computation threads to use. Should
               not be higher than the number of physical cores.
          verbose: bool, optional
               whether to print progress messages.
               If `tqdm` is installed, a progress bar will be displayed instead.
  
          Returns
          -------
  
          LightFM instance
              the fitted model