input: from typing import Tuple
  
  def compute_3_layer_nn_output(input_layer: Tuple[float, float], hidden_layer: Tuple[Tuple[float, float]], output_layer: Tuple[float, float]) -> float:
      """ Compute the output of a 3-layer artificial neural network given input layer, hidden layer, and output layer.
      >>> compute_3_layer_nn_output((2, 3), ((0.1, 0.4), (0.8, 0.6), (0.3, 0.9)), (0.3, 0.7))
      0.509
      """
output:     hidden_layer_output = []
      for neuron in hidden_layer:
          hidden_output = sum(w * x for w, x in zip(neuron, input_layer))
          hidden_layer_output.append(hidden_output)
      
      output = sum(w * x for w, x in zip(output_layer, hidden_layer_output))
      return round(output, 3)