<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def replace(self, scaling_group, name, cooldown, min_entities, max_entities, metadata=None):
 """ Replace an existing ScalingGroup configuration. All of the attributes must be specified. If you wish to delete any of the optional attributes, pass them in as None. """

        return self._manager.replace(scaling_group, name, cooldown,
                min_entities, max_entities, metadata=metadata)