def _notebook_model_from_db(self, record, content):
path = to_api_path(record['<STR_LIT>'] + record['<STR_LIT:name>'])<EOL>model = base_model(path)<EOL>model['<STR_LIT:type>'] = '<STR_LIT>'<EOL>model['<STR_LIT>'] = model['<STR_LIT>'] = record['<STR_LIT>']<EOL>if content:<EOL><INDENT>content = reads_base64(record['<STR_LIT:content>'])<EOL>self.mark_trusted_cells(content, path)<EOL>model['<STR_LIT:content>'] = content<EOL>model['<STR_LIT>'] = '<STR_LIT>'<EOL>self.validate_notebook_model(model)<EOL><DEDENT>return model<EOL>
Build a notebook model from database record.