input: Write a function to create a basic REST API using Python and Flask to list all the countries in the world. The function should read the list of countries from a JSON file and return them as a JSON response when accessing the '/countries' endpoint.
  assert isinstance(create_countries_api(), Flask)
  assert '<Response streamed [200 OK]>' in str(create_countries_api().test_client().get('/countries'))
output: def create_countries_api():
      from flask import Flask, jsonify
      import json
  
      app = Flask(__name__)
  
      @app.route('/countries', methods=['GET'])
      def get_countries():
          with open('countries.json', 'r') as file:
              countries = json.load(file)
          return jsonify(countries)
  
      return app