input: Write a function to generate a voltage signal with random noise given a specified frequency and amplitude. If the frequency and amplitude are not provided, use the default values of 250 Hz and 1 V respectively. If the duration of the signal is not specified, generate the signal over a duration of 1 second.
  
  
  import numpy as np
  
  def generate_noise_signal(freq=250, amplitude=1, duration=1):
      t = np.linspace(0, duration, int(duration * 1000))
      voltage_signal = amplitude * np.sin(2 * np.pi * freq * t) + np.random.normal(0, 0.1, len(t))
      return voltage_signal
  
  # Test cases
  assert np.array_equal(generate_noise_signal(250, 1, 1)[:5], np.array([0.07262207, 0.94434321, 0.95521021, 0.96802404, 0.20638833]))  # Compare first 5 elements with a known sequence
  assert np.array_equal(generate_noise_signal(500, 2, 0.5)[:5], np.array([-1.89969315, -0.13485565, 0.44393505, 1.82949199, 1.32757035]))
  assert np.all(generate_noise_signal(1000, 0.5, 2)[:5] != np.array([0, 0, 0, 0, 0]))  # Ensure not all zero
  assert generate_noise_signal() is not None
  
output: def generate_noise_signal(freq=250, amplitude=1, duration=1):
      t = np.linspace(0, duration, int(duration * 1000))
      voltage_signal = amplitude * np.sin(2 * np.pi * freq * t) + np.random.normal(0, 0.1, len(t))
      return voltage_signal