def METHOD_NAME(self, cmd):
    if os.path.isabs(cmd):
        return cmd
    path = self.user_env.get("PATH", "/usr/bin:/bin")
    absolute_cmd = shutil.which(cmd, path=path)
    if not absolute_cmd:
        raise sudo.PluginError("Can not find cmd '{}' on PATH".format(cmd))
    return absolute_cmd