code: def collect(self):
          
          collectors = None
          with self._lock:
              collectors = copy.copy(self._collector_to_names)
          for collector in collectors:
              for metric in collector.collect():
                  yield metric
docs: Yields metrics from the collectors in the registry.