input: from typing import Any
  
  import flask
  from flask import Flask, request, jsonify
  import json
  
  app = Flask(name)
  
  @app.route('/countries', methods=['GET'])
  def get_countries() -> Any:
      """
      This function sets up a basic REST API using Flask to serve a list of all countries.
      The list of countries is read from a file named 'data.json' and returned as a JSON response.
      >>> app.test_client().get('/countries').get_data(as_text=True)
      '{"countries":[{"name":"United States","code":"US"},{"name":"Canada","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)