code: def test_lmdb_read_from_file():
      """test_read_from_file"""
      # Copy database out because we need the path to be writable to use locks.
      path = os.path.join(
          os.path.dirname(os.path.abspath(__file__)),
          "test_lmdb",
          "data.mdb",
      )
      tmp_path = tempfile.mkdtemp()
      filename = os.path.join(tmp_path, "data.mdb")
      shutil.copy(path, filename)
  
      lmdb = tfio.IOTensor.from_lmdb(filename)
  
      assert np.all(
          [key.numpy() for key in lmdb]
          == [str(i).encode() for i in range(10)]
      )
  
      for key in lmdb:
          assert (
              lmdb[key].numpy()
              == str(chr(ord("a") + int(key.numpy()))).encode()
          )
  
      # TODO: Not working for Windows yet
      if sys.platform in ("linux", "darwin"):
          shutil.rmtree(tmp_path)
  
imports: import os
  import sys
  import shutil
  import tempfile
  import numpy
  import tensorflow_io
label_desc: Use image node_id 1 for calling a global function with example usage: test_lmdb_read_from_file() without return types