code: def active_huggingface_dataset(
      dataset,
      tokenizer=None,
      target_key: str = "label",
      input_key: str = "sentence",
      max_seq_len: int = 128,
      **kwargs,
  ):
      """
      Wrapping huggingface.datasets with baal.active.ActiveLearningDataset.
  
      Args:
          dataset (torch.utils.data.Dataset): a dataset provided by huggingface.
          tokenizer (transformers.PreTrainedTokenizer): a tokenizer provided by huggingface.
          target_key (str): target key used in the dataset's dictionary.
          input_key (str): input key used in the dataset's dictionary.
          max_seq_len (int): max length of a sequence to be used for padding the shorter sequences.
          kwargs (Dict): Parameters forwarded to 'ActiveLearningDataset'.
  
      Returns:
          an baal.active.ActiveLearningDataset object.
      """
  
      return ActiveLearningDataset(
          HuggingFaceDatasets(
              dataset, tokenizer, target_key, input_key, max_seq_len
          ),
          **kwargs,
      )
  
file_path: baal/baal/active/dataset/nlp_datasets.py
imports: from typing import List
  import numpy
  import torch
  from baal.active.dataset.base import Dataset
  from datasets import Dataset
  from baal.active import ActiveLearningDataset
label_desc: Use image node_id 1 for calling a global function with example usage: active_huggingface_dataset(dataset, tokenizer, target_key, input_key, max_seq_len) and returns: ActiveLearningDataset