What is the correct way in Python 3.7+ to check if a function is defined within a Python class. Example:
class A:
    def fun1(self):
        pass
def fun2():
    pass
I would like to distinguish that A.fun1 was defined within a class and fun2 is not.
 
     
    