input: Write a function to create a Python generator that returns numbers from a given list. The generator should yield each number in the list one by one. If the list is empty, the generator should stop immediately. If the list contains any non-integer values, raise a ValueError.
  assert list(list_generator([1, 3, 5, 7, 9])) == [1, 3, 5, 7, 9]
  assert list(list_generator([])) == []
  assert list(list_generator([2, 4, 6, 8])) == [2, 4, 6, 8]
  assert list(list_generator([-1, 0, 1])) == [-1, 0, 1]
  try:
      list(list_generator([1, 'a', 3]))
      assert False
  except ValueError:
      assert True
output: def list_generator(lst):
      for item in lst:
          if not isinstance(item, int):
              raise ValueError("List contains non-integer values")
          yield item