<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def categorize_metrics(self):
 """Called only on a valid form, this method will place the chosen metrics in the given catgory."""

        category = self.cleaned_data['category_name']
        metrics = self.cleaned_data['metrics']
        self.r.reset_category(category, metrics)