input: Write a function to generate a voltage signal with random noise given a frequency and amplitude. The function should return the generated voltage signal. If the frequency or amplitude is not provided, the function should use default values of 250 Hz and 1 V respectively.
  def generate_signal(frequency=250, amplitude=1):
      import numpy as np 
      t = np.linspace(0, 1, 1000) 
      voltage_signal = amplitude * np.sin(2 * np.pi * frequency * t) + np.random.normal(0, 0.1, 1000)
      return voltage_signal
  
  assert np.allclose(generate_signal(250, 1), np.sin(2*np.pi*250*np.linspace(0, 1, 1000)) + np.random.normal(0, 0.1, 1000))
  assert np.allclose(generate_signal(), np.sin(2*np.pi*250*np.linspace(0, 1, 1000)) + np.random.normal(0, 0.1, 1000))
  assert np.allclose(generate_signal(500, 2), 2*np.sin(2*np.pi*500*np.linspace(0, 1, 1000)) + np.random.normal(0, 0.1, 1000))
output: def generate_signal(frequency=250, amplitude=1):
      import numpy as np 
      t = np.linspace(0, 1, 1000) 
      voltage_signal = amplitude * np.sin(2 * np.pi * frequency * t) + np.random.normal(0, 0.1, 1000)
      return voltage_signal