def save_dot(path: str, filename: str, g: 'DotGraph') -> None:
    if (not os.path.isabs(filename)):
        filename = os.path.join(path, filename)
    dotfilename = (filename + '.dot')
    with open(dotfilename, 'w') as fp:
        fp.write(str(g))
def save_dot(path: str, filename: str, g: 'DotGraph') -> None:
    if (not os.path.isabs(filename)):
        filename = os.path.join(path, filename)
    dotfilename = (filename + '.dot')
    with open(dotfilename, 'w') as fp:
        fp.write(str(g))