old_contents: function render(viewName, layoutPath) {
      if (!layoutPath) {
          return function (req, res) {
              res.render(viewName);
          };
      }
      else {
          return function (req, res) {
              res.render(viewName, { layout: layoutPath });
          };
      }
  
  }
  
  module.exports = {
      render: render
  };
  
new_contents: function render(viewName, layoutPath) {
      return function (req, res) {
          if (layoutPath) {
              res.locals.layout = layoutPath;
          }
  
          res.render(viewName);
      };
  }
  
  module.exports = {
      render: render
  };
  
subject: Change implementation of `render` route