class_docstr: Read a LMDB database with a custom decoder and produce decoded outputs.
class_docstr_tok: ["Read","a","LMDB","database","with","a","custom","decoder","and","produce","decoded","outputs","."]
docstr: Args:
      lmdb_data: a :class:`LMDBData` instance.
      decoder (k,v -> dp | None): a function taking k, v and returning a datapoint,
          or return None to discard.
docstr_tok: ["Args",":","lmdb_data",":","a",":","class",":","`","LMDBData","`","instance",".","decoder","(","k",",","v","-",">","dp","|","None",")",":","a","function","taking","k",",","v","and","returning","a","datapoint",",","or","return","None","to","discard","."]
code: def __init__(self, lmdb_data, decoder):
      """
      Args:
          lmdb_data: a :class:`LMDBData` instance.
          decoder (k,v -> dp | None): a function taking k, v and returning a datapoint,
              or return None to discard.
      """
  
      def f(dp):
          return decoder(dp[0], dp[1])
  
      super(LMDBDataDecoder, self).__init__(lmdb_data, f)
  
imports: import numpy
  import os
  import six
  from ..utils import logger
  from ..utils.argtools import log_once
  from ..utils.serialize import loads
  from ..utils.develop import create_dummy_class
  from ..utils.loadcaffe import get_caffe_pb
  from ..utils.timer import timed_operation
  from ..utils.utils import get_tqdm
  from .base import DataFlowReentrantGuard, RNGDataFlow
  from .common import MapData
label_desc: Use image node_id 1 to create a new LMDBDataDecoder object from inherited base classes: MapData with example: obj = LMDBDataDecoder(lmdb_data, decoder)