def cluster_nodes(self, state=None, healthy=None):
path = '<STR_LIT>'<EOL>legal_healthy = ['<STR_LIT:true>', '<STR_LIT:false>']<EOL>if healthy is not None and healthy not in legal_healthy:<EOL><INDENT>msg = '<STR_LIT>'<EOL>raise IllegalArgumentError(msg)<EOL><DEDENT>loc_args = (<EOL>('<STR_LIT:state>', state),<EOL>('<STR_LIT>', healthy),<EOL>)<EOL>params = self.construct_parameters(loc_args)<EOL>return self.request(path, **params)<EOL>
With the Nodes API, you can obtain a collection of resources, each of
which represents a node.

:returns: API response object with JSON data
:rtype: :py:class:`yarn_api_client.base.Response`
:raises yarn_api_client.errors.IllegalArgumentError: if `healthy`
    incorrect