input: def generate_key_pair():
      """ Generate an RSA public-private key pair and write the keys to 'public.pem' and 'private.pem' files respectively.
      >>> generate_key_pair()
      # Note: The keys will be written to 'public.pem' and 'private.pem' files.
      # This test case cannot be directly compared as it involves file operations.
      """
      from Crypto.PublicKey import RSA
      key = RSA.generate(2048)
      pub_key = key.publickey().export_key().decode()
      with open('public.pem', 'w') as file:
          file.write(pub_key)
      
      priv_key = key.export_key().decode()
      with open('private.pem', 'w') as file:
          file.write(priv_key)
output:     return