docs: def get_machine(self, key):
          """ Returns the number of the machine which key gets sent to.
          """
          h = self.hash(key)
  
          # edge case where we cycle past hash value of 1 and back to 0.
          if h > self.hash_tuples[-1][2]:
              return self.hash_tuples[0][0]
  
          hash_values = map(lambda x: x[2], self.hash_tuples)
          index = bisect.bisect_left(hash_values, h)
          return self.hash_tuples[index][0]