input: Write a python function to preprocess a given sentence by tokenizing and lemmatizing it using nltk library.
  assert preprocess("The cats are running quickly.") == "The cat be run quickly"
  assert preprocess("She is reading books") == "She be read book"
  assert preprocess("He enjoys playing football and tennis") == "He enjoy play football and tennis"
output: def preprocess(sentence):
      import nltk
      from nltk.tokenize import word_tokenize
      from nltk.corpus import wordnet
      from nltk.stem import WordNetLemmatizer
      from nltk import pos_tag
      
      nltk.download('punkt')
      nltk.download('wordnet')
      nltk.download('averaged_perceptron_tagger')
      
      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
      
      tokens = word_tokenize(sentence)
      pos_tags = pos_tag(tokens)
      lemmatizer = WordNetLemmatizer()
      lemmatized_tokens = [lemmatizer.lemmatize(token, get_wordnet_pos(pos)) for token, pos in pos_tags]
      
      return ' '.join(lemmatized_tokens)