To do it robustly you’d need to examine the signatures of methods, which involves essentially implementing parts of a type checker to resolve generic types and match arguments. There are libraries that do this in general like typeguard, trycast and beartype, but given the complexity of functions in Python, it looks like they all only have basic support right now.
I don’t know your context, probably a simpler check would be sufficient.