<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_launch_configs(self, asgs):
 """Return a mapping of launch configs for the given set of asgs"""

        config_names = set()
        for a in asgs:
            if 'LaunchConfigurationName' not in a:
                continue
            config_names.add(a['LaunchConfigurationName'])
        if not config_names:
            return {}
        lc_resources = self.manager.get_resource_manager('launch-config')
        if len(config_names) < 5:
            configs = lc_resources.get_resources(list(config_names))
        else:
            configs = lc_resources.resources()
        return {
            cfg['LaunchConfigurationName']: cfg for cfg in configs
            if cfg['LaunchConfigurationName'] in config_names}