code: def setup_paths(self, environ, coll, record=False):
          
          if not coll or not self.warcserver.root_dir:
              return
  
          if coll != '$root':
              pop_path_info(environ)
              if record:
                  pop_path_info(environ)
  
          paths = [self.warcserver.root_dir]
  
          if coll != '$root':
              paths.append(coll)
  
          paths.append(self.templates_dir)
  
          # jinja2 template paths always use '/' as separator
          environ['pywb.templates_dir'] = '/'.join(paths)
docs: Populates the WSGI environment dictionary with the path information necessary to perform a response for
          content or record.
  
          :param dict environ: The WSGI environment dictionary for the request
          :param str coll: The name of the collection the record is to be served from
          :param bool record: Should the content being served by recorded (save to a warc). Only valid in record mode