input: 
  def list_countries_api():
      """Implement a basic REST API using Flask to list all the countries in the world.
      The API should return the list of countries from a local JSON file named 'data.json'.
      Example:
      When accessing the endpoint `/countries` via a GET request, the API should return:
      [{'name': 'Afghanistan', 'code': 'AF'}, {'name': 'Albania', 'code': 'AL'}, ...]
      """
  
output:     
      from flask import Flask, jsonify
      import json
  
      app = Flask(__name__)
  
      @app.route('/countries', methods=['GET'])
      def list_countries():
          with open('data.json', 'r') as file:
              countries = json.load(file)
          return jsonify(countries)
  
      if __name__ == '__main__':
          app.run(debug=True)
  