<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _get_managed_files(self):
        '''
        Build a in-memory data of all managed files.
        '''
        if self.grains_core.os_data().get('os_family') == 'Debian':
            return self.__get_managed_files_dpkg()
        elif self.grains_core.os_data().get('os_family') in ['Suse', 'redhat']:
            return self.__get_managed_files_rpm()

        return list(), list(), list()