class_docstr: Class for loading language id data and providing batches
  
  Attempt to recreate data pre-processing from: https://github.com/AU-DIS/LSTM_langid
  
  Uses methods from: https://github.com/AU-DIS/LSTM_langid/blob/main/src/language_datasets.py
  
  Data format is same as LSTM_langid
docstr: Takes the original data and creates random length examples with length between upper limit and lower limit
  From LSTM_langid: https://github.com/AU-DIS/LSTM_langid/blob/main/src/language_datasets.py
docstr_tok: ["Takes","the","original","data","and","creates","random","length","examples","with","length","between","upper","limit","and","lower","limit","From","LSTM_langid",":","https",":","\/\/github.com\/AU-DIS\/LSTM_langid\/blob\/main\/src\/language_datasets.py"]
code: def randomize_data(sentences, upper_lim=20, lower_lim=5):
      """
      Takes the original data and creates random length examples with length between upper limit and lower limit
      From LSTM_langid: https://github.com/AU-DIS/LSTM_langid/blob/main/src/language_datasets.py
      """
  
      new_data = []
      for sentence in sentences:
          remaining = sentence
          while lower_lim < len(remaining):
              lim = random.randint(lower_lim, upper_lim)
              m = min(len(remaining), lim)
              new_sentence = remaining[:m]
              new_data.append(new_sentence)
              split = remaining[m:].split(" ", 1)
              if len(split) <= 1:
                  break
              remaining = split[1]
      random.shuffle(new_data)
      return new_data
  
file_path: stanza/stanza/models/langid/data.py
imports: import json
  import random
  import torch
label_desc: Use image node_id 3 for calling the DataLoader obj's underlying member method code with example usage: obj.randomize_data(sentences, upper_lim, lower_lim) and returns: new_data