def generate_func(target_method: str) -> Callable:
                def func(self: TypeAny, *args: TypeAny, **kwargs: TypeAny) -> TypeAny:
                    func = getattr(self, target_method, None)
                    if func:
                        return func(*args, **kwargs)
                    else:
                        traceback_and_raise(
                            ValueError(
                                f"Can't call {target_method} on {klass} with the instance type of {type(self)}"
                            )
                        )

                return func