input: Write a python function to lemmatize words from a given text using POS tags and return the lemmatized text.
  assert lemmatize_text('This sentence is positive') == 'This sentence be positive'
  assert lemmatize_text('The cats are sitting on the mat') == 'The cat be sit on the mat'
  assert lemmatize_text('She enjoys playing with her friends') == 'She enjoy play with her friend'
output: def lemmatize_text(text):
      import nltk
      from nltk.corpus import wordnet
      from nltk.stem import WordNetLemmatizer
      from nltk.tokenize import word_tokenize
      from nltk import pos_tag
      
      nltk.download('punkt')
      nltk.download('averaged_perceptron_tagger')
      nltk.download('wordnet')
      
      def get_wordnet_pos(treebank_tag):
          if treebank_tag.startswith('J'):
              return wordnet.ADJ
          elif treebank_tag.startswith('V'):
              return wordnet.VERB
          elif treebank_tag.startswith('N'):
              return wordnet.NOUN
          elif treebank_tag.startswith('R'):
              return wordnet.ADV
          else:
              return wordnet.NOUN
  
      lemmatizer = WordNetLemmatizer()
      tokens = word_tokenize(text)
      pos_tags = pos_tag(tokens)
      
      lemmatized_text = ' '.join([lemmatizer.lemmatize(token, get_wordnet_pos(tag)) for token, tag in pos_tags])
      return lemmatized_text