code: def filter_consecutive_whitespaces(para):
      filtered = []
      for i, (char, label) in enumerate(para):
          if i > 0:
              if char == " " and para[i - 1][0] == " ":
                  continue
  
          filtered.append((char, label))
  
      return filtered
  
imports: from bisect import bisect_right
  from copy import copy
  import numpy
  import random
  import logging
  import re
  import torch
  from torch.utils.data import Dataset
  from .vocab import Vocab
  from stanza.models.common.utils import sort_with_indices, unsort
label_desc: Use image node_id 1 for calling a global function with example usage: filter_consecutive_whitespaces(para) and returns: filtered