<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=None):
 """ Fit the classification model; if y is multi-class, then the estimator is adapted with a OneVsRestClassifier strategy, otherwise the estimator is fit directly. """

        # The target determines what kind of estimator is fit
        ttype = type_of_target(y)
        if ttype.startswith(MULTICLASS):
            self.target_type_ = MULTICLASS
            self.estimator = OneVsRestClassifier(self.estimator)

            # Use label_binarize to create multi-label ouptut for OneVsRestClassifier
            self._target_labels = np.unique(y)
            Y = label_binarize(y, classes=self._target_labels)
        elif ttype.startswith(BINARY):
            self.target_type_ = BINARY

            # Different variable is used here to prevent transformation
            Y = y
        else:
            raise YellowbrickValueError((
                "{} does not support target type '{}', "
                "please provide a binary or multiclass single-output target"
            ).format(
                self.__class__.__name__, ttype
            ))

        # Fit the model and return self
        return super(PrecisionRecallCurve, self).fit(X, Y)