<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
What is the canonical way to check if a SciPy lil matrix is empty (i.e. contains only zeroes)?
<ASSISTANT_TASK:>
Python Code:
from scipy import sparse
sa = sparse.random(10, 10, density = 0.01, format = 'lil')
result = (sa.count_nonzero()==0)
<END_TASK>