input: from typing import List
  
  def generate_random_number(digits: int) -> int:
      """
      Generates a random number with a specified number of digits.
      
      >>> generate_random_number(6)
      456789
      >>> generate_random_number(4)
      3456
      """
      if digits < 1:
          raise ValueError("The number of digits must be at least 1.")
      lower_bound = 10**(digits - 1)
      upper_bound = 10**digits - 1
      return random.randint(lower_bound, upper_bound)
output:     import random