def METHOD_NAME(*args: P.args, **kwargs: P.kwargs) -> T | Any:
    timeout = cast(int, kwargs.pop(self.timeout_param, 0))
    if timeout:
        if not self.to_ctx_mgr:
            return self.default
        with self.to_ctx_mgr(timeout, swallow_exc=True):
            result = self.default
            # ``result`` may not be assigned below in case of timeout
            result = func(*args, **kwargs)
        return result
    else:
        return func(*args, **kwargs)