(self, key)
Create an empty instance if it doesn't exist.
        If the instance already exists, this is a noop.
Create an empty instance if it doesn't exist.
        If the instance already exists, this is a noop.
Create an empty instance if it doesn t exist . If the instance already exists this is a noop .
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] = []
def init_instance ( self , key ) : with self . _lock : if key not in self . _metadata : self . _metadata [ key ] = { } self . _metric_ids [ key ] = [ ]