input: from typing import List
  
  def generate_random_array(size: List[int]) -> List[List[int]]:
      """Generate a matrix of random integers with a given size. The integers range from 1 to 5.
      >>> print(generate_random_array([3, 3]))
      [[5, 3, 1],
       [2, 4, 5],
       [1, 3, 2]]
      """
output:     import random
      matrix = []
      for i in range(size[0]):
          row = []
          for j in range(size[1]):
              row.append(random.randint(1, 5))
          matrix.append(row)
      return matrix