code: def remove_whitespace(text_string):
      '''
      Removes all whitespace found within text_string and returns new string as type str.
  
      Keyword argument:
  
      - text_string: string instance
  
      Exceptions raised:
  
      - InputError: occurs should a string or NoneType not be passed as an argument
      '''
      if text_string is None or text_string == "":
          return ""
      elif isinstance(text_string, str):
          return " ".join(text_string.split())
      else:
          raise InputError("none type or string not passed as an argument"f remove_whitespace(text_string):
      '''
      Removes all whitespace found within text_string and returns new string as type str.
  
      Keyword argument:
  
      - text_string: string instance
  
      Exceptions raised:
  
      - InputError: occurs should a string or NoneType not be passed as an argument
      '''
      if text_string is None or text_string == "":
          return ""
      elif isinstance(text_string, str):
          return " ".join(text_string.split())
      else:
          raise InputError("none type or string not passed as an argument")
docs: Removes all whitespace found within text_string and returns new string as type str.
  
      Keyword argument:
  
      - text_string: string instance
  
      Exceptions raised:
  
      - InputError: occurs should a string or NoneType not be passed as an argument