input: Write a function to generate a random 6-digits number in Python. The generated number should be within the range of 100000 to 999999. If the generated number is not of length 6 or outside this specified range, an error must be raised. The function does not take any input parameters.
  import random
  
  def generate_random_6digit_number():
      number = random.randint(100000, 999999)
      if len(str(number)) != 6:
          raise ValueError("Generated number is not a 6-digit number")
      return number
  
  assert len(str(generate_random_6digit_number())) == 6
  assert 100000 <= generate_random_6digit_number() <= 999999
  assert isinstance(generate_random_6digit_number(), int)
output: import random
  
  def generate_random_6digit_number():
      number = random.randint(100000, 999999)
      if len(str(number)) != 6:
          raise ValueError("Generated number is not a 6-digit number")
      return number