def app_trim_memory(self, pid: int or str, level: str = 'RUNNING_LOW') -> None:
        '''Trim memory.

        Args:
            level: HIDDEN | RUNNING_MODERATE | BACKGROUNDRUNNING_LOW | \
                     MODERATE | RUNNING_CRITICAL | COMPLETE
        '''
        _, error = self._execute('-s', self.device_sn, 'shell',
                                 'am', 'send-trim-memory', str(pid), level)
        if error and error.startswith('Error'):
            raise ApplicationsException(error.split(':', 1)[-1].strip())
def app_trim_memory ( self , pid : int or str , level : str = 'RUNNING_LOW' ) -> None : _ , error = self . _execute ( '-s' , self . device_sn , 'shell' , 'am' , 'send-trim-memory' , str ( pid ) , level ) if error and error . startswith ( 'Error' ) : raise ApplicationsException ( error . split ( ':' , 1 ) [ - 1 ] . strip ( ) )
Trim memory.

        Args:
            level: HIDDEN | RUNNING_MODERATE | BACKGROUNDRUNNING_LOW | \
                     MODERATE | RUNNING_CRITICAL | COMPLETE