code: def create_pipeline(
      vocab_size=1000, max_len=50, use_cuda=False, **kwargs
  ):
      return Pipeline(
          [
              ("to_idx", TextFeaturizer(max_features=vocab_size)),
              (
                  "pad",
                  Padder2d(
                      max_len=max_len, pad_value=vocab_size, dtype=int
                  ),
              ),
              (
                  "net",
                  NeuralNetClassifier(
                      RNNClassifier,
                      device=("cuda" if use_cuda else "cpu"),
                      max_epochs=5,
                      lr=0.01,
                      optimizer=torch.optim.RMSprop,
                      module__vocab_size=vocab_size,
                      **kwargs,
                  ),
              ),
          ]
      )
  
imports: import os
  from urllib.request import urlretrieve
  import tarfile
  from dstoolbox.transformers import Padder2d
  from dstoolbox.transformers import TextFeaturizer
  import numpy
  from sklearn.datasets import load_files
  from sklearn.pipeline import Pipeline
  from skorch import NeuralNetClassifier
  import torch
  from torch import nn
  from palladium.interfaces import DatasetLoader
label_desc: Use image node_id 2 for calling a global function with example usage: create_pipeline(vocab_size, max_len, use_cuda) and returns: Pipeline