<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_sig(package):
 """ check if rpm has a signature, we don't care if it's valid or not at the moment Shamelessly stolen from Seth Vidal http://yum.baseurl.org/download/misc/checksig.py """

    rpmroot = '/'

    ts = rpm.TransactionSet(rpmroot)

    sigerror = 0
    ts.setVSFlags(0)
    hdr = return_hdr(ts, package)
    sigerror, (sigtype, sigdate, sigid) = get_sig_info(hdr)
    if sigid == 'None':
        keyid = 'None'
    else:
        keyid = sigid[-8:]
    if keyid != 'None':
        return True
    else:
        return False