code: def get(self, path, content=True, type=None, format=None):
          
          path = path.strip('/')
  
          # File extension of the chosen format.
          file_extension = format_manager().file_extension(self.format)
  
          if not self.exists(path):
              raise web.HTTPError(404, u'No such file or directory: %s' % path)
  
          os_path = self._get_os_path(path)
          if os.path.isdir(os_path):
              if type not in (None, 'directory'):
                  raise web.HTTPError(400,
                                  u'%s is a directory, not a %s' % (path, type), reason='bad type')
              model = self._dir_model(path, content=content)
          elif type == 'notebook' or (type is None and
                                      (path.endswith('.ipynb') or
                                       path.endswith(file_extension))):  # NEW
              model = self._notebook_model(path, content=content)
          else:
              if type == 'directory':
                  raise web.HTTPError(400,
                                  u'%s is not a directory', reason='bad type')
              model = self._file_model(path, content=content, format=format)
          return model
docs: Takes a path for an entity and returns its model
          Parameters
          ----------
          path : str
              the API path that describes the relative path for the target
          content : bool
              Whether to include the contents in the reply
          type : str, optional
              The requested type - 'file', 'notebook', or 'directory'.
              Will raise HTTPError 400 if the content doesn't match.
          format : str, optional
              The requested format for file contents. 'text' or 'base64'.
              Ignored if this returns a notebook or directory model.
          Returns
          -------
          model : dict
              the contents model. If content=True, returns the contents
              of the file or directory as well.