class_docstr: The MockVisualizer implements the ProjectionVisualizer interface using
  PCA as an internal transformer. This visualizer is used to directly test
  how subclasses interact with the ProjectionVisualizer base class.
class_docstr_tok: ["The","MockVisualizer","implements","the","ProjectionVisualizer","interface","using","PCA","as","an","internal","transformer",".","This","visualizer","is","used","to","directly","test","how","subclasses","interact","with","the","ProjectionVisualizer","base","class","."]
code: def transform(self, X, y=None):
      try:
          Xp = self.pca_transformer.transform(X)
      except AttributeError as e:
          raise AttributeError(
              str(e) + " try using fit_transform instead."
          )
      self.draw(Xp, y)
      return Xp
  
imports: import pytest
  import numpy.testing
  import matplotlib.pyplot
  from yellowbrick.features.projection import *
  from yellowbrick.exceptions import YellowbrickValueError
  from tests.base import VisualTestCase
  from unittest import mock
  from sklearn.decomposition import PCA
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
label_desc: Use image node_id 3 for calling the MockVisualizer obj's underlying member method code with example usage: obj.transform(X, y) and returns: Xp