<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register(self, key, **kwargs):
 """Registers metadata for a metric and returns a composite key"""

        dimensions = dict((k, str(v)) for k, v in kwargs.items())
        composite_key = self._composite_name(key, dimensions)
        self._metadata[composite_key] = {
            'metric': key,
            'dimensions': dimensions
        }
        return composite_key