<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_category(self, metric):
 """ Return a string category for the metric. The category is made up of this reporter's prefix and the metric's group and tags. Examples: prefix = 'foo', group = 'bar', tags = {'a': 1, 'b': 2} returns: 'foo.bar.a=1,b=2' prefix = 'foo', group = 'bar', tags = None returns: 'foo.bar' prefix = None, group = 'bar', tags = None returns: 'bar' """

        tags = ','.join('%s=%s' % (k, v) for k, v in
                        sorted(metric.metric_name.tags.items()))
        return '.'.join(x for x in
                        [self._prefix, metric.metric_name.group, tags] if x)