code: def lemmatize(text_string):
      '''
          Returns base from of text_string using NLTK's WordNetLemmatizer as type str.
  
          Keyword argument:
  
          - text_string: string instance
  
          Exceptions raised:
  
          - InputError: occurs should a non-string argument be passed
      '''
      if text_string is None or text_string == "":
          return ""
      elif isinstance(text_string, str):
          return LEMMATIZER.lemmatize(text_string)
      else:
          raise InputError("string not passed as primary argument"f lemmatize(text_string):
      '''
          Returns base from of text_string using NLTK's WordNetLemmatizer as type str.
  
          Keyword argument:
  
          - text_string: string instance
  
          Exceptions raised:
  
          - InputError: occurs should a non-string argument be passed
      '''
      if text_string is None or text_string == "":
          return ""
      elif isinstance(text_string, str):
          return LEMMATIZER.lemmatize(text_string)
      else:
          raise InputError("string not passed as primary argument")
docs: Returns base from of text_string using NLTK's WordNetLemmatizer as type str.
  
          Keyword argument:
  
          - text_string: string instance
  
          Exceptions raised:
  
          - InputError: occurs should a non-string argument be passed