input: Write a function to generate a voltage signal with random noise using a Python script. The function should take the frequency and amplitude of the signal as inputs and return the generated voltage signal. Use a time array starting from 0 to 1 with 1000 samples. Add normally distributed random noise to the sinusoidal signal with a mean of 0 and a standard deviation of 0.1.
  assert np.array_equal(generate_signal(250, 1)[:5], np.sin(2*np.pi*250*np.linspace(0, 1, 1000))[:5] + np.random.normal(0, 0.1, 1000)[:5])
  assert generate_signal(500, 2).shape == (1000,)
  assert generate_signal(100, 0.5)[500] == np.sin(2*np.pi*100*(500/1000)) + np.random.normal(0, 0.1, 1)[0]
output: import numpy as np
  
  def generate_signal(frequency, amplitude):
      time = np.linspace(0, 1, 1000)
      signal = amplitude * np.sin(2 * np.pi * frequency * time)
      noise = np.random.normal(0, 0.1, 1000)
      return signal + noise