code: def get_splits(args, task, FIELD, **kwargs):
      if "multi30k" in task:
          src, trg = ["." + x for x in task.split(".")[1:]]
          split = torchtext.datasets.generic.Multi30k.splits(
              exts=(src, trg), fields=FIELD, root=args.data, **kwargs
          )
      elif "iwslt" in task:
          src, trg = ["." + x for x in task.split(".")[1:]]
          split = torchtext.datasets.generic.IWSLT.splits(
              exts=(src, trg), fields=FIELD, root=args.data, **kwargs
          )
      elif "squad" in task:
          split = torchtext.datasets.generic.SQuAD.splits(
              fields=FIELD, root=args.data, description=task, **kwargs
          )
      elif "wikisql" in task:
          split = torchtext.datasets.generic.WikiSQL.splits(
              fields=FIELD,
              root=args.data,
              query_as_question="query_as_question" in task,
              **kwargs,
          )
      elif "ontonotes.ner" in task:
          split_task = task.split(".")
          _, _, subtask, nones, counting = split_task
          split = torchtext.datasets.generic.OntoNotesNER.splits(
              subtask=subtask,
              nones=True if nones == "nones" else False,
              fields=FIELD,
              root=args.data,
              **kwargs,
          )
      elif "woz" in task:
          split = torchtext.datasets.generic.WOZ.splits(
              description=task, fields=FIELD, root=args.data, **kwargs
          )
      elif "multinli" in task:
          split = torchtext.datasets.generic.MultiNLI.splits(
              description=task, fields=FIELD, root=args.data, **kwargs
          )
      elif "srl" in task:
          split = torchtext.datasets.generic.SRL.splits(
              fields=FIELD, root=args.data, **kwargs
          )
      elif "snli" in task:
          split = torchtext.datasets.generic.SNLI.splits(
              fields=FIELD, root=args.data, **kwargs
          )
      elif "schema" in task:
          split = torchtext.datasets.generic.WinogradSchema.splits(
              fields=FIELD, root=args.data, **kwargs
          )
      elif task == "cnn":
          split = torchtext.datasets.generic.CNN.splits(
              fields=FIELD, root=args.data, **kwargs
          )
      elif task == "dailymail":
          split = torchtext.datasets.generic.DailyMail.splits(
              fields=FIELD, root=args.data, **kwargs
          )
      elif task == "cnn_dailymail":
          split_cnn = torchtext.datasets.generic.CNN.splits(
              fields=FIELD, root=args.data, **kwargs
          )
          split_dm = torchtext.datasets.generic.DailyMail.splits(
              fields=FIELD, root=args.data, **kwargs
          )
          for scnn, sdm in zip(split_cnn, split_dm):
              scnn.examples.extend(sdm)
          split = split_cnn
      elif "sst" in task:
          split = torchtext.datasets.generic.SST.splits(
              fields=FIELD, root=args.data, **kwargs
          )
      elif "imdb" in task:
          kwargs["validation"] = None
          split = torchtext.datasets.generic.IMDb.splits(
              fields=FIELD, root=args.data, **kwargs
          )
      elif "zre" in task:
          split = torchtext.datasets.generic.ZeroShotRE.splits(
              fields=FIELD, root=args.data, **kwargs
          )
      elif os.path.exists(os.path.join(args.data, task)):
          split = torchtext.datasets.generic.JSON.splits(
              fields=FIELD, root=args.data, name=task, **kwargs
          )
      return split
  
file_path: decanlp/util.py
imports: from text import torchtext
  import time
  import os
  import sys
  import torch
  import random
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: get_splits(args, task, FIELD) and returns: split