input: from typing import List
  
  def generate_random_3x3_array(lib: str) -> List[List[int]]:
      """ Generate a 3x3 array of random integers ranging from 1 to 5 using the specified library.
      >>> generate_random_3x3_array('NumPy')
      [[4, 2, 5], [1, 3, 2], [4, 5, 1]]
      >>> generate_random_3x3_array('NumPy')
      [[3, 1, 5], [2, 4, 1], [3, 2, 5]]
      """
output:     if lib == 'NumPy':
          import numpy as np
          return np.random.randint(1, 6, (3, 3)).tolist()
      else:
          raise ValueError("Unsupported library")