code: def expanduser(self, path):
          
          return self._os_path.expanduser(path).replace(
              self._os_path.sep, self.sep)
docs: Return the argument with an initial component of ~ or ~user
          replaced by that user's home directory.