def __init__(self, convert_token=None):
        """Create a pipeline.

        Arguments:
            convert_token: The function to apply to input sequence data.
                If None, the identity function is used. Default: None
        """
        if convert_token is None:
            self.convert_token = Pipeline.identity
        elif callable(convert_token):
            self.convert_token = convert_token
        else:
            raise ValueError("Pipeline input convert_token {} is not None "
                             "or callable".format(convert_token))
        self.pipes = [self]
def __init__ ( self , convert_token = None ) : if convert_token is None : self . convert_token = Pipeline . identity elif callable ( convert_token ) : self . convert_token = convert_token else : raise ValueError ( "Pipeline input convert_token {} is not None " "or callable" . format ( convert_token ) ) self . pipes = [ self ]
Create a pipeline.

        Arguments:
            convert_token: The function to apply to input sequence data.
                If None, the identity function is used. Default: None