input: def list_countries_api():
      """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 response with the list of countries.
      The list of countries should be loaded from a 'data.json' file.
      >>> import requests
      >>> response = requests.get('http://127.0.0.1:5000/countries')
      >>> response.status_code
      200
      >>> response.json()[0] == {'name': 'Afghanistan', 'code': 'AF'}
      True
      """
output:     
      from flask import Flask, jsonify
      import json
  
      app = Flask(__name__)
  
      @app.route('/countries', methods=['GET'])
      def get_countries():
          with open('data.json', 'r') as file:
              countries = json.load(file)
          return jsonify(countries)
  
      if __name__ == '__main__':
          app.run(debug=True)
  