class_docstr: StreamIODataset
  
  An `StreamIODataset` is a subclass of `tf.data.Dataset` that does not have
  to be definitive, with data backed by IO operations. The data generated from
  `StreamIODataset` may run forever (unbounded). A re-run of `StreamIODataset`
  could also have a completely different sequence of data (non-repeatable).
  While `StreamIODataset` could be passed to `tf.keras`, is only suited for
  inference purposes. As a comparision, `IODataset` could be used for both
  training and inference purposes.
  
  Examples of `StreamIODataset` include `KafkaStreamIODataset` which is from
  a Kafka server, without a definitive beginning offset, or without an end
  offset.
  
  Example:
  
  ```python
  >>> import tensorflow as tf
  >>> import tensorflow_io as tfio
  >>>
  >>> kafka = tfio.StreamIODataset.from_kafka("test-topic", offset=0)
  >>>
  ```
class_docstr_tok: ["StreamIODataset","An","`","StreamIODataset","`","is","a","subclass","of","`","tf.data.Dataset","`","that","does","not","have","to","be","definitive",",","with","data","backed","by","IO","operations",".","The","data","generated","from","`","StreamIODataset","`","may","run","forever","(","unbounded",")",".","A","re-run","of","`","StreamIODataset","`","could","also","have","a","completely","different","sequence","of","data","(","non-repeatable",")",".","While","`","StreamIODataset","`","could","be","passed","to","`","tf.keras","`",",","is","only","suited","for","inference","purposes",".","As","a","comparision",",","`","IODataset","`","could","be","used","for","both","training","and","inference","purposes",".","Examples","of","`","StreamIODataset","`","include","`","KafkaStreamIODataset","`","which","is","from","a","Kafka","server",",","without","a","definitive","beginning","offset",",","or","without","an","end","offset",".","Example",":","``","`","python",">",">",">","import","tensorflow","as","tf",">",">",">","import","tensorflow_io","as","tfio",">",">",">",">",">",">","kafka","=","tfio.StreamIODataset.from_kafka","(","``","test-topic","''",",","offset=0",")",">",">",">","``","`"]
docstr: Creates a `StreamIODataset` from kafka server with only a start offset.
  
  Args:
    topic: A `tf.string` tensor containing topic subscription.
    partition: A `tf.int64` tensor containing the partition, by default 0.
    offset: A `tf.int64` tensor containing the start offset, by default 0.
    servers: An optional list of bootstrap servers, by default
       `localhost:9092`.
    configuration: An optional `tf.string` tensor containing
      configurations in [Key=Value] format. There are three
      types of configurations:
      Global configuration: please refer to 'Global configuration properties'
        in librdkafka doc. Examples include
        ["enable.auto.commit=false", "heartbeat.interval.ms=2000"]
      Topic configuration: please refer to 'Topic configuration properties'
        in librdkafka doc. Note all topic configurations should be
        prefixed with `conf.topic.`. Examples include
        ["conf.topic.auto.offset.reset=earliest"]
      Reference: https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md
    name: A name prefix for the IODataset (optional).
  
  Returns:
    A `StreamIODataset`.
docstr_tok: ["Creates","a","`","StreamIODataset","`","from","kafka","server","with","only","a","start","offset",".","Args",":","topic",":","A","`","tf.string","`","tensor","containing","topic","subscription",".","partition",":","A","`","tf.int64","`","tensor","containing","the","partition",",","by","default","0.","offset",":","A","`","tf.int64","`","tensor","containing","the","start","offset",",","by","default","0.","servers",":","An","optional","list","of","bootstrap","servers",",","by","default","`","localhost:9092","`",".","configuration",":","An","optional","`","tf.string","`","tensor","containing","configurations","in","[","Key=Value","]","format",".","There","are","three","types","of","configurations",":","Global","configuration",":","please","refer","to","'Global","configuration","properties'","in","librdkafka","doc",".","Examples","include","[","``","enable.auto.commit=false","''",",","``","heartbeat.interval.ms=2000","''","]","Topic","configuration",":","please","refer","to","'Topic","configuration","properties'","in","librdkafka","doc",".","Note","all","topic","configurations","should","be","prefixed","with","`","conf.topic.","`",".","Examples","include","[","``","conf.topic.auto.offset.reset=earliest","''","]","Reference",":","https",":","\/\/github.com\/edenhill\/librdkafka\/blob\/master\/CONFIGURATION.md","name",":","A","name","prefix","for","the","IODataset","(","optional",")",".","Returns",":","A","`","StreamIODataset","`","."]
code: def from_kafka(
      cls,
      topic,
      partition=0,
      offset=0,
      servers=None,
      configuration=None,
      **kwargs,
  ):
      """Creates a `StreamIODataset` from kafka server with only a start offset.
  
      Args:
        topic: A `tf.string` tensor containing topic subscription.
        partition: A `tf.int64` tensor containing the partition, by default 0.
        offset: A `tf.int64` tensor containing the start offset, by default 0.
        servers: An optional list of bootstrap servers, by default
           `localhost:9092`.
        configuration: An optional `tf.string` tensor containing
          configurations in [Key=Value] format. There are three
          types of configurations:
          Global configuration: please refer to 'Global configuration properties'
            in librdkafka doc. Examples include
            ["enable.auto.commit=false", "heartbeat.interval.ms=2000"]
          Topic configuration: please refer to 'Topic configuration properties'
            in librdkafka doc. Note all topic configurations should be
            prefixed with `conf.topic.`. Examples include
            ["conf.topic.auto.offset.reset=earliest"]
          Reference: https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md
        name: A name prefix for the IODataset (optional).
  
      Returns:
        A `StreamIODataset`.
  
      """
      with tf.name_scope(kwargs.get("name", "IOFromKafka")):
          return kafka_dataset_ops.KafkaStreamIODataset(
              topic,
              partition=partition,
              offset=offset,
              servers=servers,
              configuration=configuration,
              internal=True,
          )
  
imports: import tensorflow
  from tensorflow_io.python.ops import audio_ops
  from tensorflow_io.python.ops import io_dataset_ops
  from tensorflow_io.python.ops import hdf5_dataset_ops
  from tensorflow_io.python.ops import avro_dataset_ops
  from tensorflow_io.python.ops import lmdb_dataset_ops
  from tensorflow_io.python.ops import kafka_dataset_ops
  from tensorflow_io.python.ops import ffmpeg_dataset_ops
  from tensorflow_io.python.ops import json_dataset_ops
  from tensorflow_io.python.ops import parquet_dataset_ops
  from tensorflow_io.python.ops import pcap_dataset_ops
  from tensorflow_io.python.ops import mnist_dataset_ops
  from tensorflow_io.python.ops import orc_dataset_ops
label_desc: Use image node_id 1 for calling the StreamIODataset obj's underlying member method code with example usage: obj.from_kafka(cls, topic, partition, offset, servers, configuration) and returns: kafka_dataset_ops