code: def __get_sub_rec(self, lpath):
          
          for d in lpath:
              root = self.get_path(d)
              if root is not None:
                  # always keep root
                  yield d
              else:
                  # if invalid
                  continue
  
              # nothing else to expect
              if not os.path.isdir(root):
                  continue
  
              # normalization
              root = os.path.normpath(root)
              # recursion
              lend = len(root)
              for iwd in self._wmd.items():
                  cur = iwd[1].path
                  pref = os.path.commonprefix([root, cur])
                  if root == os.sep or (len(pref) == lend and \
                                        len(cur) > lend and \
                                        cur[lend] == os.sep):
                      yield iwd[1].wd
docs: Get every wd from self._wmd if its path is under the path of
          one (at least) of those in lpath. Doesn't follow symlinks.
  
          @param lpath: list of watch descriptor
          @type lpath: list of int
          @return: list of watch descriptor
          @rtype: list of int