def create_git_tree(self, tree, base_tree=github.GithubObject.NotSet):
assert all(isinstance(element, github.InputGitTreeElement) for element in tree), tree<EOL>assert base_tree is github.GithubObject.NotSet or isinstance(base_tree, github.GitTree.GitTree), base_tree<EOL>post_parameters = {<EOL>"<STR_LIT>": [element._identity for element in tree],<EOL>}<EOL>if base_tree is not github.GithubObject.NotSet:<EOL><INDENT>post_parameters["<STR_LIT>"] = base_tree._identity<EOL><DEDENT>headers, data = self._requester.requestJsonAndCheck(<EOL>"<STR_LIT:POST>",<EOL>self.url + "<STR_LIT>",<EOL>input=post_parameters<EOL>)<EOL>return github.GitTree.GitTree(self._requester, headers, data, completed=True)<EOL>
:calls: `POST /repos/:owner/:repo/git/trees <http://developer.github.com/v3/git/trees>`_
:param tree: list of :class:`github.InputGitTreeElement.InputGitTreeElement`
:param base_tree: :class:`github.GitTree.GitTree`
:rtype: :class:`github.GitTree.GitTree`