<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def squeeze(self, array):
 """ Simplify the given array as much as possible - squeeze out all singleton dimensions and also convert a zero dimensional array into array scalar """

        if not self._squeeze:
            return array
        array = array.copy()
        array = array.squeeze()
        if array.ndim == 0:
            array = array[()]
        return array