input: Write a python function to generate a dictionary of prime numbers and their squares from 2 to 10.
  assert generate_prime_squares() == {2: 4, 3: 9, 5: 25, 7: 49}
output: def generate_prime_squares():
      def is_prime(n):
          if n <= 1:
              return False
          for i in range(2, int(n ** 0.5) + 1):
              if n % i == 0:
                  return False
          return True
  
      return {x: x ** 2 for x in range(2, 11) if is_prime(x)}