input: Write a python function to convert a sentence into Pig Latin.
  assert pig_latin("hello world") == "ellohay orldway"
  assert pig_latin("python is fun") == "ythonpay siay unfay"
  assert pig_latin("I love programming") == "Iay ovelay rogrammingpay"
output: def pig_latin(sentence):
      def convert_word(word):
          if word[0].lower() in 'aeiou':
              return word + 'ay'
          else:
              return word[1:] + word[0] + 'ay'
  
      return ' '.join(convert_word(word) for word in sentence.split())