def METHOD_NAME(self):
    """Select directory"""
    basedir = str(self.wd_edit.text())
    if not osp.isdir(basedir):
        basedir = getcwd_or_home()
    directory = getexistingdirectory(self, _("Select directory"), basedir)
    if directory:
        self.wd_edit.setText(directory)
        self.dir = directory