'Attempt to get rendered content for this document'

@newrelic.agent.function_trace()
def get_rendered(self, cache_control=None, base_url=None):

    if (not self.rendered_html):
        try:
            self.schedule_rendering(cache_control, base_url)
        except DocumentRenderingInProgress:
            raise DocumentRenderedContentNotAvailable
    if cache_control:
        try:
            self.schedule_rendering(cache_control, base_url)
        except DocumentRenderingInProgress:
            pass
    errors = None
    try:
        errors = ((self.rendered_errors and json.loads(self.rendered_errors)) or None)
    except ValueError:
        pass
    if (not self.rendered_html):
        if errors:
            return ('', errors)
        else:
            raise DocumentRenderedContentNotAvailable
    return (self.rendered_html, errors)
