def METHOD_NAME(self, mock_library):
    mock_library.niModInst_CloseInstalledDevicesSession.side_effect = MockFunctionCallError("niModInst_CloseInstalledDevicesSession")
    mock_library.niModInst_CloseInstalledDevicesSession.return_value = 0
    mock_library.niModInst_GetExtendedErrorInfo.side_effect = MockFunctionCallError("niModInst_GetExtendedErrorInfo")
    mock_library.niModInst_GetExtendedErrorInfo.return_value = 0
    mock_library.niModInst_GetInstalledDeviceAttributeViInt32.side_effect = MockFunctionCallError("niModInst_GetInstalledDeviceAttributeViInt32")
    mock_library.niModInst_GetInstalledDeviceAttributeViInt32.return_value = 0
    mock_library.niModInst_GetInstalledDeviceAttributeViString.side_effect = MockFunctionCallError("niModInst_GetInstalledDeviceAttributeViString")
    mock_library.niModInst_GetInstalledDeviceAttributeViString.return_value = 0
    mock_library.niModInst_OpenInstalledDevicesSession.side_effect = MockFunctionCallError("niModInst_OpenInstalledDevicesSession")
    mock_library.niModInst_OpenInstalledDevicesSession.return_value = 0