code: def absolute_url(relative_url):
      
      default_server = 'http://inspirehep.net'
      server = current_app.config.get('SERVER_NAME', default_server)
      if not re.match('^https?://', server):
          server = u'http://{}'.format(server)
      return urllib.parse.urljoin(server, relative_url)
docs: Returns an absolute URL from a URL relative to the server root.
  
      The base URL is taken from the Flask app config if present, otherwise it
      falls back to ``http://inspirehep.net``.