<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_metric_ids(self, key, metric_ids):
 """ Store the list of metric IDs we will want to collect for the given instance key """

        with self._lock:
            self._metric_ids[key] = metric_ids