input: Write a python function to create a Flask application that fetches data from an external URL and returns it as JSON.
  assert requests.get('http://127.0.0.1:5000/data').json() == requests.get('https://example.com/dataset.json').json()
output: def create_app():
      from flask import Flask, jsonify
      import requests
  
      app = Flask(__name__)
  
      @app.route('/data', methods=['GET'])
      def get_data():
          response = requests.get('https://example.com/dataset.json')
          data = response.json()
          return jsonify(data)
  
      return app