def collect(self):
collectors = None<EOL>with self._lock:<EOL><INDENT>collectors = copy.copy(self._collector_to_names)<EOL><DEDENT>for collector in collectors:<EOL><INDENT>for metric in collector.collect():<EOL><INDENT>yield metric<EOL><DEDENT><DEDENT>
Yields metrics from the collectors in the registry.