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