def METHOD_NAME(source, size=None, attribs=''):
    try:
        ret = subprocess.run(['dot', '-Tsvg',
            '-Gfontname={}'.format(_font),
            '-Nfontname={}'.format(_font),
            '-Efontname={}'.format(_font),
            '-Gfontsize={}'.format(_font_size),
            '-Nfontsize={}'.format(_font_size),
            '-Efontsize={}'.format(_font_size),
            '-Gbgcolor=transparent',
            ], input=source.encode('utf-8'), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        if ret.returncode: print(ret.stderr.decode('utf-8'))
        ret.check_returncode()
    except FileNotFoundError: # pragma: no cover
        raise RuntimeError("dot not found")
    # First remove comments
    svg = _comment_src.sub('', ret.stdout.decode('utf-8'))
    # Remove preamble and fixed size
    if size:
        svg = _patch_src.sub(_patch_custom_size_dst.format(attribs=attribs, size=size), svg)
    else:
        def patch_repl(match): return _patch_dst.format(
            attribs=attribs,
            width=_pt2em(float(match.group('width'))),
            height=_pt2em(float(match.group('height'))),
            viewBox=match.group('viewBox'))
        svg = _patch_src.sub(patch_repl, svg)
    # Remove unnecessary IDs and attributes, replace classes for elements
    def element_repl(match):
        classes = ['m-' + match.group('type')] + match.group('classes').replace('&#45;', '-').split()
        # distinguish between solid and filled nodes
        if ((match.group('type') == 'node' and match.group('fill') == 'none') or
            # a plaintext node is also flat
            match.group('element') == 'text'
        ):
            classes += ['m-flat']
        return _class_dst.format(
            classes=' '.join(classes),
            title=match.group('title'),
            element=match.group('element'))
    svg = _class_src.sub(element_repl, svg)
    # Remove unnecessary fill and stroke attributes
    svg = _attributes_src.sub(_attributes_dst, svg)
    # Remove unnecessary text attributes. Keep font size only if nondefault
    def text_repl(match):
        if float(match.group('size')) != _font_size:
            return _text_dst.format(size=float(match.group('size')))
        return ''
    svg = _text_src.sub(text_repl, svg)
    return svg