<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Test suite for Jupyter-notebook
Sample example of use of PyCOMPSs from Jupyter
First step
Import ipycompss library
Step1:  Second step
Initialize COMPSs runtime
Parameters indicates if the execution will generate task graph, tracefile, monitor interval and debug information. The parameter taskCount is a work around for the dot generation of the legend
Step2:  Third step
Import task module before annotating functions or methods
Step3:  Fourth step
Declare functions and decorate with @task those that should be tasks
Step4:  Fifth step
Invoke tasks
Step5:  Sixt step
Import compss_wait_on module and synchronize tasks
Step6:  Only those results being sychronized with compss_wait_on will have a valid value
Step7:  Stop COMPSs runtime. All data will be synchronized in the main program
Step8:  CHECK THE RESULTS FOR THE TEST
<ASSISTANT_TASK:>
Python Code:
import pycompss.interactive as ipycompss
Explanation: Test suite for Jupyter-notebook
Sample example of use of PyCOMPSs from Jupyter
First step
Import ipycompss library
End of explanation
ipycompss.start(graph=True, trace=True, debug=True, project_xml='../project.xml', resources_xml='../resources.xml')
Explanation: Second step
Initialize COMPSs runtime
Parameters indicates if the execution will generate task graph, tracefile, monitor interval and debug information. The parameter taskCount is a work around for the dot generation of the legend
End of explanation
from pycompss.api.task import task
Explanation: Third step
Import task module before annotating functions or methods
End of explanation
@task(returns=int)
def test(val1):
    return val1 * val1
@task(returns=int)
def test2(val2, val3):
    return val2 + val3
Explanation: Fourth step
Declare functions and decorate with @task those that should be tasks
End of explanation
a = test(2)
b = test2(a, 5)
Explanation: Fifth step
Invoke tasks
End of explanation
from pycompss.api.api import compss_wait_on
result = compss_wait_on(b)
Explanation: Sixt step
Import compss_wait_on module and synchronize tasks
End of explanation
print("Results: ")
print("a: ", a)
print("b: ", b)
print("result: ", result)
Explanation: Only those results being sychronized with compss_wait_on will have a valid value
End of explanation
ipycompss.stop(sync=True)
print("Results after stopping PyCOMPSs: ")
print("a: ", a)
print("b: ", b)
print("result: ", result)
Explanation: Stop COMPSs runtime. All data will be synchronized in the main program
End of explanation
from pycompss.runtime.binding import Future
if a == 4 and isinstance(b, Future) and result == 9:
    print("RESULT=EXPECTED")
else:
    print("RESULT=UNEXPECTED")
Explanation: CHECK THE RESULTS FOR THE TEST
End of explanation
<END_TASK>