input: 
  import flask
  from flask import Flask, request, jsonify
  import json
  
  app = Flask(name)
  
  @app.route('/countries', methods=['GET'])
  def get_countries():
      """ Create a REST API endpoint to list all the countries in the world. The countries data
      is loaded from a JSON file called 'data.json'. The endpoint should return the list of countries
      as a JSON object.
      
      Example:
      If 'data.json' contains:
      [
          {"name": "United States", "country_code": "US"},
          {"name": "Canada", "country_code": "CA"}
      ]
      Accessing the '/countries' endpoint should return:
      [
          {"name": "United States", "country_code": "US"},
          {"name": "Canada", "country_code": "CA"}
      ]
      """
      with open('data.json', 'r') as f:
          countries = json.load(f)
      return jsonify(countries)
  
  if name == 'main':
      app.run()
  
output:     
      with open('data.json', 'r') as f:
          countries = json.load(f)
      return jsonify(countries)
  