code: def vpathto(self, other_version):
          
          is_root = self.context['scv_is_root']
          pagename = self.context['pagename']
          if self.context['current_version'] == other_version and not is_root:
              return '{}.html'.format(pagename.split('/')[-1])
  
          other_remote = self[other_version]
          other_root_dir = other_remote['root_dir']
          components = ['..'] * pagename.count('/')
          components += [other_root_dir] if is_root else ['..', other_root_dir]
          components += [pagename if self.vhasdoc(other_version) else other_remote['master_doc']]
          return '{}.html'.format(__import__('posixpath').join(*components))
docs: Return relative path to current document in another version. Like Sphinx's pathto().
  
          If the current document doesn't exist in the other version its master_doc path is returned instead.
  
          :raise KeyError: If other_version doesn't exist.
  
          :param str other_version: Version to link to.
  
          :return: Relative path.
          :rtype: str