input: Write a function to generate a voltage signal with random noise given a signal frequency and amplitude, using a Python script. If the input frequency is 250 Hz and the amplitude is 1 V, return the voltage signal with added noise. If the input is invalid, return an empty array.
  
  assert generate_voltage_signal(250, 1).shape==(1000,)
  assert np.mean(generate_voltage_signal(250, 1))!=0  # Random noise ensures non-zero mean
  assert generate_voltage_signal(None, 1)==[]
  assert generate_voltage_signal(250, None)==[]
output: import numpy as np
  
  def generate_voltage_signal(frequency, amplitude):
      if frequency is None or amplitude is None:
          return []
      t = np.linspace(0, 1, 1000)
      signal = amplitude * np.sin(2 * np.pi * frequency * t)
      noise = np.random.normal(0, 0.1, 1000)
      return signal + noise