class_docstr: LMDBIODataset
code: def __init__(self, filename, **kwargs):
      with tf.name_scope("LMDBIODataset") as scope:
          mapping = core_ops.io_lmdb_mapping_init(
              filename,
              container=scope,
              shared_name=f"{filename}/{uuid.uuid4().hex}",
          )
          resource = core_ops.io_lmdb_readable_init(
              filename,
              container=scope,
              shared_name=f"{filename}/{uuid.uuid4().hex}",
          )
          capacity = kwargs.get("capacity", 4096)
          dataset = tf.compat.v2.data.Dataset.range(
              0, sys.maxsize, capacity
          )
          dataset = dataset.map(
              lambda index: core_ops.io_lmdb_readable_read(
                  resource,
                  start=index,
                  stop=index + capacity,
                  shape=tf.TensorShape([None]),
                  dtype=tf.string,
              )
          )
          dataset = dataset.apply(
              tf.data.experimental.take_while(
                  lambda v: tf.greater(tf.shape(v)[0], 0)
              )
          )
          dataset = dataset.map(
              lambda key: (
                  key,
                  core_ops.io_lmdb_mapping_read(mapping, key),
              )
          )
          dataset = dataset.unbatch()
  
          self._mapping = mapping
          self._resource = resource
          self._capacity = capacity
          self._dataset = dataset
          super().__init__(self._dataset._variant_tensor)
  
file_path: io/tensorflow_io/python/ops/lmdb_dataset_ops.py
imports: import sys
  import uuid
  import tensorflow
  from tensorflow_io.python.ops import core_ops
label_desc: Use image node_id 1 to create a new LMDBIODataset object from inherited base classes: tf.compat.v2.data with example: obj = LMDBIODataset(filename)