def get_notebook_object(self, notebook_id):
path = self.find_path(notebook_id)<EOL>if not os.path.isfile(path):<EOL><INDENT>raise web.HTTPError(<NUM_LIT>, u'<STR_LIT>' % notebook_id)<EOL><DEDENT>info = os.stat(path)<EOL>last_modified = datetime.datetime.utcfromtimestamp(info.st_mtime)<EOL>with open(path,'<STR_LIT:r>') as f:<EOL><INDENT>s = f.read()<EOL>try:<EOL><INDENT>nb = current.reads(s, u'<STR_LIT>')<EOL><DEDENT>except:<EOL><INDENT>raise web.HTTPError(<NUM_LIT>, u'<STR_LIT>')<EOL><DEDENT><DEDENT>nb.metadata.name = os.path.splitext(os.path.basename(path))[<NUM_LIT:0>]<EOL>return last_modified, nb<EOL>
Get the NotebookNode representation of a notebook by notebook_id.