input: def create_rest_api(countries_json_path: str) -> Flask:
      """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 located at the given path.
      The API should have a single endpoint '/countries' that returns the list of countries as JSON.
      >>> app = create_rest_api('data.json')
      >>> response = app.test_client().get('/countries')
      >>> response.status_code
      200
      >>> response.json[0]['name']
      'Afghanistan'
      """
      
output:     
      from flask import Flask, jsonify
      import json
  
      app = Flask(__name__)
  
      @app.route('/countries', methods=['GET'])
      def get_countries():
          with open(countries_json_path, 'r') as file:
              countries = json.load(file)
          return jsonify(countries)
  
      return app
  