<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_readonly_instance(cls, working_dir, expected_snapshots={}):
 """ Get a read-only handle to the blockstack-specific name db. Multiple read-only handles may exist. Returns the handle on success. Returns None on error """

        import virtualchain_hooks
        db_path = virtualchain.get_db_filename(virtualchain_hooks, working_dir)
        db = BlockstackDB(db_path, DISPOSITION_RO, working_dir, get_genesis_block(), expected_snapshots={})
        rc = db.db_setup()
        if not rc:
            log.error("Failed to set up virtualchain state engine")
            return None
        
        return db