class_docstr: PrometheusScrapeStreamIODataset
class_docstr_tok: ["PrometheusScrapeStreamIODataset"]
docstr: PrometheusScrapeStreamIODataset.
docstr_tok: ["PrometheusScrapeStreamIODataset","."]
code: def __init__(self, metric, endpoint, interval=None, internal=True):
      """PrometheusScrapeStreamIODataset."""
      with tf.name_scope("PrometheusScrapeStreamIODataset"):
          assert internal
  
          interval = 1000000 if interval is None else interval
  
          dataset = tf.data.experimental.Counter(
              start=0, step=1, dtype=tf.int64
          )
          dataset = dataset.map(
              lambda i: golang_ops.io_prometheus_scrape(
                  metric, endpoint, i
              )
          )
          dataset = dataset.apply(sleep(interval))
  
          self._dataset = dataset
          super().__init__(self._dataset._variant_tensor)
  
file_path: io/tensorflow_io/python/ops/prometheus_dataset_ops.py
imports: import tensorflow
  from tensorflow.python.data.experimental.ops.testing import sleep
  from tensorflow_io.python.ops import golang_ops
label_desc: Use image node_id 1 to create a new PrometheusScrapeStreamIODataset object from inherited base classes: tf.data with example: obj = PrometheusScrapeStreamIODataset(metric, endpoint, interval, internal)