input: Write a function to create a basic REST API using Flask to list all the countries in the world by reading them from a JSON file named 'data.json'. The function should return a Flask application object that, when run, provides an endpoint `/countries` that returns a JSON list of countries.
  
  def create_country_api():
      import flask
      from flask import Flask, jsonify
      import json
  
      app = Flask(__name__)
  
      @app.route('/countries', methods=['GET'])
      def get_countries():
          with open('data.json', 'r') as f:
              countries = json.load(f)
          return jsonify(countries)
  
      return app
  
  assert create_country_api().test_client().get('/countries').status_code == 200
  assert 'countries' in create_country_api().test_client().get('/countries').get_json()
  assert 'United States' in create_country_api().test_client().get('/countries').get_json()['countries']
output: def create_country_api():
      import flask
      from flask import Flask, jsonify
      import json
  
      app = Flask(__name__)
  
      @app.route('/countries', methods=['GET'])
      def get_countries():
          with open('data.json', 'r') as f:
              countries = json.load(f)
          return jsonify(countries)
  
      return app