class_docstr: Defines a pipeline for transforming sequence data.
  
  The input is assumed to be utf-8 encoded `str` (Python 3) or
  `unicode` (Python 2).
  
  Attributes:
      convert_token: The function to apply to input sequence data.
      pipes: The Pipelines that will be applid to input sequence
          data in order.
docstr: Create a pipeline.
  
  Arguments:
      convert_token: The function to apply to input sequence data.
          If None, the identity function is used. Default: None
docstr_tok: ["Create","a","pipeline",".","Arguments",":","convert_token",":","The","function","to","apply","to","input","sequence","data",".","If","None",",","the","identity","function","is","used",".","Default",":","None"]
code: 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]
  
file_path: decanlp/text/torchtext/data/pipeline.py
label_desc: Use image node_id 1 to create a new Pipeline object from inherited base classes: object with example: obj = Pipeline(convert_token)