def _has_tag(version, debug=False):
cmd = sh.git.bake('<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>"<STR_LIT>".format(version))<EOL>try:<EOL><INDENT>util.run_command(cmd, debug=debug)<EOL>return True<EOL><DEDENT>except sh.ErrorReturnCode:<EOL><INDENT>return False<EOL><DEDENT>
Determine a version is a local git tag name or not.

:param version: A string containing the branch/tag/sha to be determined.
:param debug: An optional bool to toggle debug output.
:return: bool