input: Write a function to create a basic REST API using Python and Flask to list all the countries in the world. The function should return an instance of the Flask app.
  assert create_rest_api().url_map.bind('').match('/countries').rule == '/countries'
  assert create_rest_api().url_map.bind('').match('/countries').methods == {'GET'}
  assert callable(create_rest_api().url_map.bind('').match('/countries').endpoint())
  assert create_rest_api().name == 'name'
output: 
  def create_rest_api():
      from flask import Flask, jsonify
  
      app = Flask(__name__)
  
      countries = [
          {"name": "Afghanistan"},
          {"name": "Albania"},
          {"name": "Algeria"},
          {"name": "Andorra"},
          {"name": "Angola"},
          {"name": "Antigua and Barbuda"},
          {"name": "Argentina"},
          {"name": "Armenia"},
          {"name": "Australia"},
          {"name": "Austria"},
          {"name": "Azerbaijan"}
      ]
  
      @app.route('/countries', methods=['GET'])
      def get_countries():
          return jsonify(countries)
  
      return app
  