input: Write a function to create a basic REST API using Python and Flask to list all the countries in the world. The API should have a route '/countries' that returns a JSON list of countries read from a 'data.json' file. The function should return the Flask app.
  assert get_countries_api().route('/countries')(None) is not None
  assert isinstance(get_countries_api(), flask.Flask)
output: def get_countries_api():
      from flask import Flask, jsonify
      import json
  
      app = Flask(__name__)
  
      @app.route('/countries')
      def get_countries():
          with open('data.json', 'r') as file:
              countries = json.load(file)
          return jsonify(countries)
  
      return app