def get_signed_item(item, public_key, private_key, expires=None):
    signed_item = item.copy()
    timestamp = time.time()
    expires_at = 0.0  # it's a float, dammit
    t = type(expires)
    if expires and (t == int or t == float) and expires > 0:
        expires_at = timestamp + expires
    signed_item['_p4p2p'] = {
        'timestamp': timestamp,
        'expires': expires_at,
        'version': get_version(),
        'public_key': public_key
    }
    root_hash = _get_hash(signed_item)
    key = RSA.importKey(private_key)
    signer = PKCS1_v1_5.new(key)
    sig = base64.encodebytes(signer.sign(root_hash)).decode('utf-8')
    signed_item['_p4p2p']['signature'] = sig
    return signed_item
Returns a copy of the passed in item that has been signed using the
dataset/ETHPy150Open ntoll/p4p2p/p4p2p/dht/crypto.py/get_signed_item