Given N GPU nodes, you have access to a test(S) function where S is a set of nodes: test(S) returns True if every node in S is healthy, and False if at least one node in S is faulty. Design an efficient algorithm to identify ALL bad nodes. Constraints: (1)…