input: Write a python function to traverse through a given set of data using the Iterator pattern.
  assert traverse_iterator(["Apple", "Banana", "Orange", "Strawberry"]) == ["Apple", "Banana", "Orange", "Strawberry"]
  assert traverse_iterator(["Carrot", "Tomato", "Cucumber"]) == ["Carrot", "Tomato", "Cucumber"]
  assert traverse_iterator(["Mango", "Pineapple"]) == ["Mango", "Pineapple"]
output: def traverse_iterator(data):
      iterator = iter(data)
      result = []
      try:
          while True:
              item = next(iterator)
              result.append(item)
      except StopIteration:
          pass
      return result