<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_tag(version):
 """ check theres not already a tag for this version """


    output = run('git', 'tag', stdout=subprocess.PIPE).communicate()[0]
    tags = set(output.decode('utf-8').splitlines())

    if 'v{}'.format(version) in tags:
        error('version already exists')