def unparse(root, format='xcode', projectname='', disable_comments=False, parseinfo=None):
    """Generate the content of a project.pbxproj.

    :type root: the root node of the tree.
    :type format: 'xcode', 'xml', 'json'.
    :type projectname: basename of the .xcodeproj.
    :type disable_comments: don't add comments after the gids.
    :type parseinfo: if you parsed the project you can pass this from the parse result.
                     we use this to guess if comments should be recreated.
    :return:
    """
    if root is None:
        raise ValueError("root is None")
    unparserclass = unparsers.get(format)
    if unparserclass is None:
        raise ValueError(', '.join(output_formats) % 'format must be one of [%s]')
    unparser = unparserclass(root)
    text = unparser.unparse(root, projectname=projectname, disable_comments=disable_comments, parseinfo=parseinfo)
    return bytestr(text)


# noinspection PySetFunctionToLiteral
dataset/ETHPy150Open mikr/xcodeprojer/xcodeprojer.py/unparse/swapped operands of `%`