input: Write a python function to convert a sentence to Pig Latin.
  assert pig_latin("Hello world") == "elloHay orldway"
  assert pig_latin("I love programming") == "Iway ovelay rogrammingpay"
  assert pig_latin("Python is fun") == "ythonPay isway unfay"
output: def pig_latin(sentence):
      def convert_word(word):
          if word[0].lower() in 'aeiou':
              return word + 'way'
          else:
              return word[1:] + word[0] + 'ay'
      
      return ' '.join(convert_word(word) for word in sentence.split())