<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def html(self, data=None, template=None):
 """ Send html document to user. Args: - data: Dict to render template, or string with rendered HTML. - template: Name of template to render HTML document with passed data. """

        if data is None:
            data = {}
        if template:
            return render(self.request, template, data)
        return HttpResponse(data)