In the latest version of scipy, shape is changed from a function to an attribute of csr_matrix.
shape
https://docs.scipy.org/doc/scipy-1.15.0/reference/generated/scipy.sparse.csr_matrix.shape.html