def METHOD_NAME(self, max_retries=3, *args, **kwargs):
    for i in range(max_retries + 1):
        try:
            stdout, stderr = self._run_command(*args, **kwargs)
            return stdout, stderr
        except Exception:
            if i == max_retries:
                raise
            # retry after 0.5, 1, 1.5, ... seconds
            time.sleep((i + 1) * 0.5)
            continue
        else:
            break
    raise ValueError(max_retries)