def check(self, feature):
        """Check that the feature can be pickled

        This is needed for saving the pipeline to disk
        """
        try:
            buf = io.BytesIO()
            pickle.dump(feature, buf, protocol=pickle.HIGHEST_PROTOCOL)
            buf.seek(0)
            new_feature = pickle.load(buf)
            assert new_feature is not None
            assert isinstance(new_feature, Feature)
        finally:
            buf.close()
def check ( self , feature ) : try : buf = io . BytesIO ( ) pickle . dump ( feature , buf , protocol = pickle . HIGHEST_PROTOCOL ) buf . seek ( 0 ) new_feature = pickle . load ( buf ) assert new_feature is not None assert isinstance ( new_feature , Feature ) finally : buf . close ( )
Check that the feature can be pickled

        This is needed for saving the pipeline to disk