def command(engine, format, filepath=None):
    if engine not in ENGINES:
        raise ValueError('unknown engine: %r' % engine)
    if format not in FORMATS:
        raise ValueError('unknown format: %r' % format)

    args, rendered = [engine, '-T%s' % format], None
    if filepath is not None:
        args.extend(['-O', filepath])
        rendered = '%s.%s' % (filepath, format)

    return args, rendered
Return args list for subprocess.Popen and name of the rendered file.
dataset/ETHPy150Open xflr6/graphviz/graphviz/backend.py/command