def _get_os_ram_recommendation(self, ram):
        upper_bounds = [4, 8, 16, 24, 48, 64, 72, 96, 128, 256]
        reserve_for_os = [1, 2, 2, 4, 6, 8, 8, 12, 24, 32]
        for (upper, reserve) in zip(upper_bounds, reserve_for_os):
            if ram <= upper:
                return reserve
        return 64
dataset/ETHPy150Open openstack/sahara/sahara/plugins/recommendations_utils.py/HadoopAutoConfigsProvider._get_os_ram_recommendation/original