code: def assert_metric_has_tag(self, metric_name, tag, count=None, at_least=1):
          
          self._asserted.add(metric_name)
  
          candidates = []
          for metric in self.metrics(metric_name):
              if tag in metric.tags:
                  candidates.append(metric)
  
          if count is not None:
              assert len(candidates) == count
          else:
              assert len(candidates) >= at_least
docs: Assert a metric is tagged with tag