def METHOD_NAME(obj: Any) -> Any:
    if isinstance(obj, (types.FunctionType, types.MethodType)):
        func = cast(Callable[..., Any], obj)
        # pylint: disable=no-value-for-parameter
        return decorate_callable(func)  # pyright: ignore[reportGeneralTypeIssues]
        # pylint: enable=no-value-for-parameter
    else:
        # this would need to be recursive
        for m_name in dir(obj):
            m = getattr(obj, m_name)
            if isinstance(m, (types.FunctionType, types.MethodType)):
                # skip static methods, since they are not wrapped correctly
                # by wrapt.
                # if anyone reading this knows how the following line
                # works please let me know.
                # wrapt cannot wrap class methods in 3.11.0
                # see https://github.com/python/cpython/issues/63272
                if isinstance(
                    obj.__dict__.get(m_name, None), (staticmethod, classmethod)
                ):
                    continue
                # pylint: disable=no-value-for-parameter
                setattr(
                    obj,
                    m_name,
                    decorate_callable(
                        m
                    ),  # pyright: ignore[reportGeneralTypeIssues]
                )
                # pylint: enable=no-value-for-parameter
        return obj