<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fit(self, X, y, Z):
 """Compute the Semi-Supervised Shared Response Model Parameters X : list of 2D arrays, element i has shape=[voxels_i, n_align] Each element in the list contains the fMRI data for alignment of one subject. There are n_align samples for each subject. y : list of arrays of int, element i has shape=[samples_i] Each element in the list contains the labels for the data samples in Z. Z : list of 2D arrays, element i has shape=[voxels_i, samples_i] Each element in the list contains the fMRI data of one subject for training the MLR classifier. """

        logger.info('Starting SS-SRM')

        # Check that the alpha value is in range (0.0,1.0)
        if 0.0 >= self.alpha or self.alpha >= 1.0:
            raise ValueError("Alpha parameter should be in range (0.0, 1.0)")

        # Check that the regularizer value is positive
        if 0.0 >= self.gamma:
            raise ValueError("Gamma parameter should be positive.")

        # Check the number of subjects
        if len(X) <= 1 or len(y) <= 1 or len(Z) <= 1:
            raise ValueError("There are not enough subjects in the input "
                             "data to train the model.")

        if not (len(X) == len(y)) or not (len(X) == len(Z)):
            raise ValueError("Different number of subjects in data.")

        # Check for input data sizes
        if X[0].shape[1] < self.features:
            raise ValueError(
                "There are not enough samples to train the model with "
                "{0:d} features.".format(self.features))

        # Check if all subjects have same number of TRs for alignment
        # and if alignment and classification data have the same number of
        # voxels per subject. Also check that there labels for all the classif.
        # sample
        number_trs = X[0].shape[1]
        number_subjects = len(X)
        for subject in range(number_subjects):
            assert_all_finite(X[subject])
            assert_all_finite(Z[subject])
            if X[subject].shape[1] != number_trs:
                raise ValueError("Different number of alignment samples "
                                 "between subjects.")
            if X[subject].shape[0] != Z[subject].shape[0]:
                raise ValueError("Different number of voxels between alignment"
                                 " and classification data (subject {0:d})"
                                 ".".format(subject))
            if Z[subject].shape[1] != y[subject].size:
                raise ValueError("Different number of samples and labels in "
                                 "subject {0:d}.".format(subject))

        # Map the classes to [0..C-1]
        new_y = self._init_classes(y)

        # Run SS-SRM
        self.w_, self.s_, self.theta_, self.bias_ = self._sssrm(X, Z, new_y)

        return self