code: def check_under_base(path, base, os_sep=os.sep):
      '''
      Check if given absolute path is under given base.
  
      :param path: absolute path
      :type path: str
      :param base: absolute base path
      :type base: str
      :param os_sep: path separator, defaults to os.sep
      :return: wether file is under given base or not
      :rtype: bool
      '''
      prefix = base if base.endswith(os_sep) else base + os_sep
      return os.path.normcase(path).startswith(os.path.normcase(prefix)f check_under_base(path, base, os_sep=os.sep):
      '''
      Check if given absolute path is under given base.
  
      :param path: absolute path
      :type path: str
      :param base: absolute base path
      :type base: str
      :param os_sep: path separator, defaults to os.sep
      :return: wether file is under given base or not
      :rtype: bool
      '''
      prefix = base if base.endswith(os_sep) else base + os_sep
      return os.path.normcase(path).startswith(os.path.normcase(prefix))
docs: Check if given absolute path is under given base.
  
      :param path: absolute path
      :type path: str
      :param base: absolute base path
      :type base: str
      :param os_sep: path separator, defaults to os.sep
      :return: wether file is under given base or not
      :rtype: bool