code: def doc_dir(self):
          
          from os.path import abspath
  
          if not self.ref:
              return None
  
          u = parse_app_url(self.ref)
          return abspath(dirname(u.path))
docs: The absolute directory of the document