input: Write a function to generate a random integer within the range [0, 10) (i.e., from 0 inclusive to 10 exclusive). If the input provided is a seed number, the function should initialize the random number generator with that seed.
  
  import random
  
  def random_number_generator(seed=None):
      if seed is not None:
          random.seed(seed)
      return random.randint(0, 9)
  
  assert random_number_generator() in range(0, 10)
  assert random_number_generator(seed=42) == random_number_generator(seed=42)
  assert random_number_generator() != random_number_generator()
output: def random_number_generator(seed=None):
      if seed is not None:
          random.seed(seed)
      return random.randint(0, 9)