import random
from unittest.mock import Mock, ANY
def mymethod(a, handler):
handler(a, random.random())
def test_mymethod():
handler = Mock()
mymethod(5, handler)
handler.assert_any_call(5, ANY)
test_mymethod()
aW1wb3J0IHJhbmRvbQpmcm9tIHVuaXR0ZXN0Lm1vY2sgaW1wb3J0IE1vY2ssIEFOWQoKZGVmIG15bWV0aG9kKGEsIGhhbmRsZXIpOgogICAgaGFuZGxlcihhLCByYW5kb20ucmFuZG9tKCkpCgpkZWYgdGVzdF9teW1ldGhvZCgpOgogICAgaGFuZGxlciA9IE1vY2soKQogICAgbXltZXRob2QoNSwgaGFuZGxlcikKICAgIGhhbmRsZXIuYXNzZXJ0X2FueV9jYWxsKDUsIEFOWSkKCnRlc3RfbXltZXRob2QoKQ==