<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_launch_metadata(self, scaling_group, metadata):
 """ Adds the given metadata dict to the existing metadata for the scaling group's launch configuration. """

        if not isinstance(scaling_group, ScalingGroup):
            scaling_group = self.get(scaling_group)
        curr_meta = scaling_group.launchConfiguration.get("args", {}).get(
                "server", {}).get("metadata", {})
        curr_meta.update(metadata)
        return self.update_launch_config(scaling_group, metadata=curr_meta)