class_docstr: A sensor applies a continuous sequence of numerical values
  to a set of associated metrics. For example a sensor on
  message size would record a sequence of message sizes using
  the `record(double)` api and would maintain a set
  of metrics about request sizes such as the average or max.
class_docstr_tok: ["A","sensor","applies","a","continuous","sequence","of","numerical","values","to","a","set","of","associated","metrics",".","For","example","a","sensor","on","message","size","would","record","a","sequence","of","message","sizes","using","the","`","record","(","double",")","`","api","and","would","maintain","a","set","of","metrics","about","request","sizes","such","as","the","average","or","max","."]
docstr: Check if we have violated our quota for any metric that
  has a configured quota
docstr_tok: ["Check","if","we","have","violated","our","quota","for","any","metric","that","has","a","configured","quota"]
code: def _check_quotas(self, time_ms):
      """
      Check if we have violated our quota for any metric that
      has a configured quota
      """
      for metric in self._metrics:
          if metric.config and metric.config.quota:
              value = metric.value(time_ms)
              if not metric.config.quota.is_acceptable(value):
                  raise QuotaViolationError(
                      "'%s' violated quota. Actual: "
                      "%d, Threshold: %d"
                      % (
                          metric.metric_name,
                          value,
                          metric.config.quota.bound,
                      )
                  )
  
file_path: kafka-python/kafka/metrics/stats/sensor.py
imports: from __future__ import absolute_import
  import threading
  import time
  from kafka.errors import QuotaViolationError
  from kafka.metrics import KafkaMetric
label_desc: Use image node_id 6 for calling the Sensor obj's underlying member method code with example usage: obj._check_quotas(time_ms) without return types