input: Write a python function to translate a sentence into Pig Latin.
  assert translate_pig_latin("hello world") == "ellohay orldway"
  assert translate_pig_latin("this is a test") == "isthay isway away esttay"
  assert translate_pig_latin("python is fun") == "ythonpay isway unfay"
output: def translate_pig_latin(sentence):
      def translate_word(word):
          vowels = 'aeiou'
          if word[0] in vowels:
              return word + 'way'
          else:
              for i, letter in enumerate(word):
                  if letter in vowels:
                      return word[i:] + word[:i] + 'ay'
              return word + 'ay'
  
      words = sentence.split()
      pig_latin_words = [translate_word(word) for word in words]
      return ' '.join(pig_latin_words)