class_docstr: StreamIODataset
docstr: Creates an `StreamIODataset` from a prometheus scrape endpoint.
  
  Args:
    metric: A string, the name of the metric to scrape.
    endpoint: A string, the address of prometheus scrape endpoint.
    interval: An integer, the time interval to scrape, by default 1s.
    name: A name prefix for the IODataset (optional).
  
  Returns:
    A `IODataset`.
docstr_tok: ["Creates","an","`","StreamIODataset","`","from","a","prometheus","scrape","endpoint",".","Args",":","metric",":","A","string",",","the","name","of","the","metric","to","scrape",".","endpoint",":","A","string",",","the","address","of","prometheus","scrape","endpoint",".","interval",":","An","integer",",","the","time","interval","to","scrape",",","by","default","1s",".","name",":","A","name","prefix","for","the","IODataset","(","optional",")",".","Returns",":","A","`","IODataset","`","."]
code: def from_prometheus_scrape(
      cls, metric, endpoint, interval=None, **kwargs
  ):
      """Creates an `StreamIODataset` from a prometheus scrape endpoint.
  
      Args:
        metric: A string, the name of the metric to scrape.
        endpoint: A string, the address of prometheus scrape endpoint.
        interval: An integer, the time interval to scrape, by default 1s.
        name: A name prefix for the IODataset (optional).
  
      Returns:
        A `IODataset`.
      """
      with tf.name_scope(kwargs.get("name", "IOFromPrometheusScrape")):
          from tensorflow_io.python.ops import (  # pylint: disable=import-outside-toplevel
              prometheus_dataset_ops,
          )
  
          return prometheus_dataset_ops.PrometheusScrapeStreamIODataset(
              metric, endpoint, interval=interval, internal=True
          )
  
imports: import tensorflow
  from tensorflow_io.python.ops import io_dataset
  from tensorflow_io.python.experimental import libsvm_dataset_ops
  from tensorflow_io.python.experimental import image_dataset_ops
  from tensorflow_io.python.experimental import kinesis_dataset_ops
  from tensorflow_io.python.experimental import pubsub_dataset_ops
  from tensorflow_io.python.experimental import grpc_dataset_ops
  from tensorflow_io.python.experimental import file_dataset_ops
  from tensorflow_io.python.experimental import numpy_dataset_ops
  from tensorflow_io.python.experimental import sql_dataset_ops
  from tensorflow_io.python.experimental import video_dataset_ops
label_desc: Use image node_id 2 for calling the StreamIODataset obj's underlying member method code with example usage: obj.from_prometheus_scrape(cls, metric, endpoint, interval) and returns: prometheus_dataset_ops