docs: def init_instance(self, key):
          """
          Create an empty instance if it doesn't exist.
          If the instance already exists, this is a noop.
          """
          with self._lock:
              if key not in self._metadata:
                  self._metadata[key] = {}
                  self._metric_ids[key] = []