input: Write a function to generate a voltage signal with random noise given a signal frequency and amplitude. The function should return the generated signal. If the input frequency or amplitude is not specified, the function should use default values of 250 Hz and 1 V respectively.
  assert np.array_equal(generate_signal(250, 1)[:10], [0.9340273, 0.94437673, 0.86580104, 0.86118267, 0.81310465, 0.82753269, 0.75374911, 0.75418434, 0.70955421, 0.72146552])
  assert np.array_equal(generate_signal()[0], 1.07032243)
  assert np.all(generate_signal(250, 1) <= 2) and np.all(generate_signal(250, 1) >= -2)
output: import numpy as np
  
  def generate_signal(frequency=250, amplitude=1):
      t = np.linspace(0, 1, 1000)
      noise = np.random.normal(0, 0.1, 1000)
      signal = amplitude * np.sin(2 * np.pi * frequency * t) + noise
      return signal