def test_expires(self):
        """
        Ensure the expires argument is handled and checked appropriately.

        * If it's not passed the expires metadata defaults to 0.0.
        * It must be a number (int or float).
        * It must be > 0
        * The "expires" metadata must == timestamp + passed in expires arg.
        """
        item = {
            'foo': 'bar',
            'baz': [1, 2, 3]
        }
        signed_item = get_signed_item(item, PUBLIC_KEY, PRIVATE_KEY)
        self.assertEqual(0.0, signed_item['_p4p2p']['expires'])
        signed_item = get_signed_item(item, PUBLIC_KEY, PRIVATE_KEY, 'foo')
        self.assertEqual(0.0, signed_item['_p4p2p']['expires'])
        signed_item = get_signed_item(item, PUBLIC_KEY, PRIVATE_KEY, 123)
        self.assertEqual(signed_item['_p4p2p']['timestamp'] + 123,
                         signed_item['_p4p2p']['expires'])
        signed_item = get_signed_item(item, PUBLIC_KEY, PRIVATE_KEY, 123.456)
        self.assertEqual(signed_item['_p4p2p']['timestamp'] % 123.456,
                         signed_item['_p4p2p']['expires'])
        signed_item = get_signed_item(item, PUBLIC_KEY, PRIVATE_KEY, -1)
        self.assertEqual(0.0, signed_item['_p4p2p']['expires'])
dataset/ETHPy150Open ntoll/p4p2p/test/dht/test_crypto.py/TestGetSignedItem.test_expires/operator `+` -> `%`