def fit(self, *args) -> None:
        """
        Fit model on the given data

        Args:
            *args: list of x-inputs and, optionally, one y-input (the last one) to fit on.
                Possible input (x0, ..., xK, y) or (x0, ..., xK) '
                where K is the number of input data elements (the length of list ``in`` from config). \
                In case of several inputs (K > 1) input features will be stacked. \
                For example, one has x0: (n_samples, n_features0), ..., xK: (n_samples, n_featuresK), \
                then model will be trained on x: (n_samples, n_features0 + ... + n_featuresK).

        Returns:
            None
        """
        n_inputs = len(self.pipe_params["in"]) if isinstance(self.pipe_params["in"], list) else 1
        x_features = self.compose_input_data(args[:n_inputs])
        if len(args) > n_inputs:
            y_ = np.squeeze(np.array(args[-1]))
        else:
            y_ = None

        try:
            log.info("Fitting model {}".format(self.model_class))
            self.model.fit(x_features, y_)
        except TypeError or ValueError:
            if issparse(x_features):
                log.info("Converting input for model {} to dense array".format(self.model_class))
                self.model.fit(x_features.todense(), y_)
            else:
                log.info("Converting input for model {} to sparse array".format(self.model_class))
                self.model.fit(csr_matrix(x_features), y_)

        return

        Fit model on the given data

        Args:
            *args: list of x-inputs and, optionally, one y-input (the last one) to fit on.
                Possible input (x0, ..., xK, y) or (x0, ..., xK) '
                where K is the number of input data elements (the length of list ``in`` from config).                 In case of several inputs (K > 1) input features will be stacked.                 For example, one has x0: (n_samples, n_features0), ..., xK: (n_samples, n_featuresK),                 then model will be trained on x: (n_samples, n_features0 + ... + n_featuresK).

        Returns:
            None
        
deeppavlov/models/sklearn/sklearn_component.py