input: Write a python function to create a short URL using the given code.
  assert create_short_url() == 'abcd123'
  assert shorten().json == {'url': 'http://example.com/', 'short_url': 'http://example.com/abcd123'}
  assert app.test_client().post('/shorten', json={"url": "http://example.com"}).status_code == 201
output: import random
  import string
  from flask import Flask, request, jsonify
  
  app = Flask(__name__)
  
  def create_short_url():
      return ''.join(random.choices(string.ascii_letters + string.digits, k=7))
  
  @app.route('/shorten', methods=['POST'])
  def shorten():
      data = request.get_json()
      original_url = data['url']
      short_code = create_short_url()
      short_url = f"{original_url.rstrip('/')}/{short_code}"
      response = {
          'url': original_url,
          'short_url': short_url
      }
      return jsonify(response), 201