Write a function to remove all whitespaces from the given string using regex.
import re
def remove_whitespaces(text1):
  return (re.sub(r'\s+', '',text1))
<s>[INST]<<SYS>>Given a task and its code, generate test cases for the code.<</SYS>>Write a function to remove all whitespaces from the given string using regex.
import re
def remove_whitespaces(text1):
  return (re.sub(r'\s+', '',text1))[/INST]assert remove_whitespaces(' Google    Flutter ') == 'GoogleFlutter'
assert remove_whitespaces(' Google    Dart ') == 'GoogleDart'
assert remove_whitespaces(' iOS    Swift ') == 'iOSSwift'</s>