'Save html report and open it in browser.
Parameters
fname : str
File name of the report.
open_browser : bool
Open html browser after saving if True.
overwrite : bool
If True, overwrite report if it already exists.'

def save(self, fname=None, open_browser=True, overwrite=False):

    if (fname is None):
        if (not hasattr(self, 'data_path')):
            self.data_path = op.dirname(__file__)
            warn(('`data_path`    not    provided.    Using    %s    instead' % self.data_path))
        fname = op.realpath(op.join(self.data_path, 'report.html'))
    else:
        fname = op.realpath(fname)
    self._render_toc()
    html = footer_template.substitute(date=time.strftime('%B    %d,    %Y'), current_year=time.strftime('%Y'))
    self.html.append(html)
    if ((not overwrite) and op.isfile(fname)):
        msg = ('Report    already    exists    at    location    %s.    Overwrite    it    (y/[n])?    ' % fname)
        answer = moves.input(msg)
        if (answer.lower() == 'y'):
            overwrite = True
    if (overwrite or (not op.isfile(fname))):
        logger.info(('Saving    report    to    location    %s' % fname))
        fobj = codecs.open(fname, 'w', 'utf-8')
        fobj.write(_fix_global_ids(u''.join(self.html)))
        fobj.close()
        self.html.pop(0)
        self.html.pop(0)
        self.html.pop()
    if open_browser:
        import webbrowser
        webbrowser.open_new_tab(('file://' + fname))
    return fname
