code: def urlpath_to_abspath(path, base, os_sep=os.sep):
      '''
      Make uri relative path fs absolute using a given absolute base path.
  
      :param path: relative path
      :param base: absolute base path
      :param os_sep: path component separator, defaults to current OS separator
      :return: absolute path
      :rtype: str or unicode
      :raises OutsideDirectoryBase: if resulting path is not below base
      '''
      prefix = base if base.endswith(os_sep) else base + os_sep
      realpath = os.path.abspath(prefix + path.replace('/', os_sep))
      if check_path(base, realpath) or check_under_base(realpath, base):
          return realpath
      raise OutsideDirectoryBase("%r is not under %r" % (realpath, base)f urlpath_to_abspath(path, base, os_sep=os.sep):
      '''
      Make uri relative path fs absolute using a given absolute base path.
  
      :param path: relative path
      :param base: absolute base path
      :param os_sep: path component separator, defaults to current OS separator
      :return: absolute path
      :rtype: str or unicode
      :raises OutsideDirectoryBase: if resulting path is not below base
      '''
      prefix = base if base.endswith(os_sep) else base + os_sep
      realpath = os.path.abspath(prefix + path.replace('/', os_sep))
      if check_path(base, realpath) or check_under_base(realpath, base):
          return realpath
      raise OutsideDirectoryBase("%r is not under %r" % (realpath, base))
docs: Make uri relative path fs absolute using a given absolute base path.
  
      :param path: relative path
      :param base: absolute base path
      :param os_sep: path component separator, defaults to current OS separator
      :return: absolute path
      :rtype: str or unicode
      :raises OutsideDirectoryBase: if resulting path is not below base