Let's take this example:
class Foo:
def func(self):
pass
def func():
pass
f1 = Foo.func
f2 = func
I'm inspecting code and want to find out from dir or inspect if f1 is a class method and f2 is a function that is not part of any class ?