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 read the list of countries from a JSON file named 'data.json' and 
      return the list as a JSON response. The API endpoint should be '/countries'.
      Example:
      for the endpoint '/countries', if 'data.json' contains 
      [
          {"name": "Argentina", "capital": "Buenos Aires"},
          {"name": "Brazil", "capital": "Brasília"}
      ]
      then the API should return
      [
          {"name": "Argentina", "capital": "Buenos Aires"},
          {"name": "Brazil", "capital": "Brasília"}
      ]
      """
      import flask
      from flask import Flask, request, 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)
  
      if __name__ == '__main__':
          app.run()
output:     import flask
      from flask import Flask, request, 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)
  
      if __name__ == '__main__':
          app.run()