def upload_asset(self, path, label="<STR_LIT>", content_type="<STR_LIT>"):
assert isinstance(path, (str, unicode)), path<EOL>assert isinstance(label, (str, unicode)), label<EOL>post_parameters = {<EOL>"<STR_LIT:name>": basename(path),<EOL>"<STR_LIT:label>": label<EOL>}<EOL>headers = {}<EOL>if len(content_type) > <NUM_LIT:0>:<EOL><INDENT>headers["<STR_LIT:Content-Type>"] = content_type<EOL><DEDENT>resp_headers, data = self._requester.requestBlobAndCheck(<EOL>"<STR_LIT:POST>",<EOL>self.upload_url.split("<STR_LIT>")[<NUM_LIT:0>],<EOL>parameters=post_parameters,<EOL>headers=headers,<EOL>input=path<EOL>)<EOL>return github.GitReleaseAsset.GitReleaseAsset(self._requester, resp_headers, data, completed=True)<EOL>
:calls: `POST https://<upload_url>/repos/:owner/:repo/releases/:release_id/assets?name=foo.zip <https://developer.github.com/v3/repos/releases/#upload-a-release-asset>`_
:rtype: :class:`github.GitReleaseAsset.GitReleaseAsset`