'Run the deployment script on the provided node. At this point it is
assumed that SSH connection has already been established.
:param task: Deployment task to run.
:type task: :class:`Deployment`
:param node: Node to run the task on.
:type node: ``Node``
:param ssh_client: A configured and connected SSHClient instance.
:type ssh_client: :class:`SSHClient`
:param max_tries: How many times to retry if a deployment fails
before giving up. (default is 3)
:type max_tries: ``int``
:rtype: :class:`.Node`
:return: ``Node`` Node instance on success.'

def _run_deployment_script(self, task, node, ssh_client, max_tries=3):

    tries = 0
    while (tries < max_tries):
        try:
            node = task.run(node, ssh_client)
        except Exception:
            tries += 1
            if (tries >= max_tries):
                e = sys.exc_info()[1]
                raise LibcloudError(value=('Failed    after    %d    tries:    %s' % (max_tries, str(e))), driver=self)
        else:
            ssh_client.close()
            return node
