docs: def _has_4gram_match(ref, pred):
      '''
      >>> _has_4gram_match(['four', 'lovely', 'tokens', 'here'],
      ...                  ['four', 'lovely', 'tokens', 'here'])
      True
      >>> _has_4gram_match(['four', 'lovely', 'tokens', 'here'],
      ...                  ['four', 'lovely', 'tokens', 'here', 'and', 'there'])
      True
      >>> _has_4gram_match(['four', 'lovely', 'tokens', 'here'],
      ...                  ['four', 'ugly', 'tokens', 'here'])
      False
      >>> _has_4gram_match(['four', 'lovely', 'tokens'],
      ...                  ['lovely', 'tokens', 'here'])
      False
      '''
      if len(ref) < 4 or len(pred) < 4:
          return False
  
      for i in range(len(ref) - 3):
          for j in range(len(pred) - 3):
              if ref[i:i + 4] == pred[j:j + 4]:
                  return True
      return False