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 signal as an output. If the frequency or amplitude is zero, the function should return None.
  assert generate_signal(250, 1).shape == (1000,)
  assert generate_signal(0, 0) == None
  assert generate_signal(50, 2).shape == (1000,)
  assert generate_signal(0, 1) == None
  assert generate_signal(100, 0) == None
output: def generate_signal(frequency, amplitude):
      if frequency == 0 or amplitude == 0:
          return None
      t = np.linspace(0, 0.004, 1000)
      signal = amplitude * np.sin(2 * np.pi * frequency * t) + np.random.normal(0, 0.1, 1000)
      return signal