Use __self__ from bound function as allows us to provide instance as class type for class method and None for static method.