input: Write a function to generate a voltage signal with random noise using a Python script. The function should take a signal frequency and amplitude as inputs and return the noisy voltage signal as a numpy array.
  assert np.allclose(generate_noisy_signal(250, 1)[:10], np.sin(2*np.pi*250*np.linspace(0, 0.001, 10)) + np.random.normal(0, 0.1, 10))
  assert generate_noisy_signal(100, 2).shape == (1000,)
  assert generate_noisy_signal(500, 0.5).shape == (1000,)
output: import numpy as np
  
  def generate_noisy_signal(frequency, amplitude):
      t = np.linspace(0, 0.004, 1000)
      signal = amplitude * np.sin(2 * np.pi * frequency * t)
      noise = np.random.normal(0, 0.1, 1000)
      return signal + noise