<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _maybe_to_sparse(array):
 """ array must be SparseSeries or SparseArray """

    if isinstance(array, ABCSparseSeries):
        array = array.values.copy()
    return array