```\n        function _isActive(Hat memory _hat, uint256 _hatId) internal view  returns (bool) {\n        bytes memory data = \n             abi.encodeWithSignature("getHatStatus(uint256)", _hatId);\n                (bool success, bytes memory returndata) = \n        _hat.toggle.staticcall(data);\n        if (success && returndata.length > 0) {\n            return abi.decode(returndata, (bool));\n                } else {\n        return _getHatStatus(_hat);\n                }\n         }\n```\n