code: def split_process_dataset(args, transforms):
      if args.dataset == "ljspeech":
          data = LJSPEECH(root=args.file_path, download=False)
  
          val_length = int(len(data) * args.val_ratio)
          lengths = [len(data) - val_length, val_length]
          train_dataset, val_dataset = random_split(data, lengths)
  
      elif args.dataset == "libritts":
          train_dataset = LIBRITTS(
              root=args.file_path, url="train-clean-100", download=False
          )
          val_dataset = LIBRITTS(
              root=args.file_path, url="dev-clean", download=False
          )
  
      else:
          raise ValueError(
              f"Expected dataset: `ljspeech` or `libritts`, but found {args.dataset}"
          )
  
      train_dataset = Processed(train_dataset, transforms)
      val_dataset = Processed(val_dataset, transforms)
  
      train_dataset = MapMemoryCache(train_dataset)
      val_dataset = MapMemoryCache(val_dataset)
  
      return train_dataset, val_dataset
  
file_path: audio/examples/pipeline_wavernn/datasets.py
imports: import random
  import torch
  from processing import bits_to_normalized_waveform, normalized_waveform_to_bits
  from torch.utils.data.dataset import random_split
  from torchaudio.datasets import LIBRITTS, LJSPEECH
  from torchaudio.transforms import MuLawEncoding
label_desc: Use image node_id 1 for calling a global function with example usage: split_process_dataset(args, transforms) and returns: train_dataset,  val_dataset