def gauge(self, name):
        """
        Returns an existing or creates and returns a new gauge
        :param name: name of the gauge
        :return: the gauge object
        """
        with self._lock:
            if name not in self._gauges:
                if self._registry._ignore_patterns and any(
                    pattern.match(name) for pattern in self._registry._ignore_patterns
                ):
                    gauge = noop_metric
                else:
                    gauge = Gauge(name)
                self._gauges[name] = gauge
            return self._gauges[name]