code: def _choose_node(self, nodes=None):
          
          if not nodes:
              nodes = self.nodes
  
          # Prefer nodes which have gone a reasonable time without
          # errors
          def _error_rate(node):
              return node.error_rate.value()
  
          good = [n for n in nodes if _error_rate(n) < 0.1]
  
          if len(good) is 0:
              # Fall back to a minimally broken node
              return min(nodes, key=_error_rate)
          else:
              return random.choice(good)
docs: Chooses a random node from the list of nodes in the client,
          taking into account each node's recent error rate.
          :rtype RiakNode