class_docstr: Main life2vec data processing pipeline. The data is generated based on a corpus
  and a task. The generated data is stored in /processed/<corpus>/<task>, with
  subfolders corresponding to each data split. The remaining parameters are given
  to :class:`torch.utils.data.DataLoader`.
  
  :param corpus: The corpus to generate data from.
  :param vocabulary: Vocabulary to use.
  :param task: Task to generate data for.
  
  :param batch_size: Batch size
  :param num_workers: Number of data loading workers
  :param persisten_worksers: Whether to persist workers
  :param pin_memory: Whether to pin memory
class_docstr_tok: ["Main","life2vec","data","processing","pipeline",".","The","data","is","generated","based","on","a","corpus","and","a","task",".","The","generated","data","is","stored","in","\/processed\/","<","corpus",">","\/","<","task",">",",","with","subfolders","corresponding","to","each","data","split",".","The","remaining","parameters","are","given","to",":","class",":","`","torch.utils.data.DataLoader","`",".",":","param","corpus",":","The","corpus","to","generate","data","from",".",":","param","vocabulary",":","Vocabulary","to","use",".",":","param","task",":","Task","to","generate","data","for",".",":","param","batch_size",":","Batch","size",":","param","num_workers",":","Number","of","data","loading","workers",":","param","persisten_worksers",":","Whether","to","persist","workers",":","param","pin_memory",":","Whether","to","pin","memory"]
docstr: Instantiaties and return a dataloader for the given dataset using the
  parameters of the module
docstr_tok: ["Instantiaties","and","return","a","dataloader","for","the","given","dataset","using","the","parameters","of","the","module"]
code: def get_dataloader(
      self, dataset: Dataset, shuffle: bool = True
  ) -> DataLoader:
      """Instantiaties and return a dataloader for the given dataset using the
      parameters of the module"""
      return DataLoader(
          dataset,
          batch_size=self.batch_size,
          num_workers=self.num_workers,
          shuffle=shuffle,
          collate_fn=collate_encoded_documents,
          generator=torch.Generator(),
          pin_memory=self.pin_memory,
          persistent_workers=self.persistent_workers,
      )
  
imports: import enum
  import logging
  import pickle
  from dataclasses import dataclass, replace
  from pathlib import Path
  from typing import Any, Dict, List, Optional
  from typing_extensions import dataclass_transform
  import dask
  import dask.dataframe
  import pandas
  import numpy
  import pytorch_lightning
  import torch
  from pandas.tseries.offsets import MonthEnd
  from torch.utils.data import DataLoader, Dataset, WeightedRandomSampler
  from ..tasks.base import Task, collate_encoded_documents
  from .sampler import FixedSampler
  from .dataset import DocumentDataset, ShardedDocumentDataset
  from .decorators import save_parquet, save_pickle
  from .ops import concat_columns_dask, concat_sorted
  from .populations.base import Population
  from .serialize import DATA_ROOT, ValidationError, _jsonify
  from .sources.base import Field, TokenSource
  from .vocabulary import Vocabulary
label_desc: Use image node_id 9 for calling the L2VDataModule obj's underlying member method code with example usage: obj.get_dataloader(dataset, shuffle) and returns: DataLoader