<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_memdb(buffer):
 """Creates a sourcemap view from MemDB bytes."""

        buffer = to_bytes(buffer)
        return View._from_ptr(rustcall(
            _lib.lsm_view_from_memdb,
            buffer, len(buffer)))