def AnyMock(cls):
class AnyMock(ABC):<EOL><INDENT>def __eq__(self, other):<EOL><INDENT>return isinstance(other, cls)<EOL><DEDENT><DEDENT>AnyMock.register(cls)<EOL>return AnyMock()<EOL>
Mocks a matcher for any instance of class cls.
e.g. my_mock.called_once_with(Any(int), "bar")