def METHOD_NAME(self):
    tensor_size = 256 * 1024 * 1024
    input0_np, infer_response = self._send_identity_tensor(
        tensor_size, self._is_decoupled
    )
    out_of_memory_message = "Failed to increase the shared memory pool size for key"
    if infer_response.has_error():
        self.assertIn(out_of_memory_message, infer_response.error().message())
    else:
        self.assertFalse(infer_response.has_error())
        output0 = pb_utils.get_output_tensor_by_name(infer_response, "OUTPUT0")
        self.assertIsNotNone(output0)
        self.assertTrue(np.allclose(output0.as_numpy(), input0_np))
    tensor_size = 50 * 1024 * 1024
    for _ in range(4):
        input0_np, infer_response = self._send_identity_tensor(
            tensor_size, self._is_decoupled
        )
        if infer_response.has_error():
            self.assertIn(out_of_memory_message, infer_response.error().message())
        else:
            self.assertFalse(infer_response.has_error())
            output0 = pb_utils.get_output_tensor_by_name(infer_response, "OUTPUT0")
            self.assertIsNotNone(output0)
            self.assertTrue(np.allclose(output0.as_numpy(), input0_np))