def _is_cluster_done(cluster):
 return ((cluster.status.state == 'TERMINATING') or hasattr(cluster.status.timeline, 'enddatetime'))

def _is_cluster_done ( cluster ) : return ( ( cluster . status . state == 'TERMINATING' ) or hasattr ( cluster . status . timeline , 'enddatetime' ) )
return true if the given cluster is done running .