code: def get_text_field():
      try:
          from torchtext import data
  
          text_field = data.Field(lower=True)
      except AttributeError:
          # torchtext >= 0.8.0
          from torchtext.legacy import data
  
          text_field = data.Field(lower=True)
      return text_field
  
file_path: small-text/tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
imports: import unittest
  import pytest
  import numpy
  from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
  from tests.utils.datasets import random_labeling, random_labels
label_desc: Use image node_id 1 for calling a global function with example usage: get_text_field() and returns: text_field