code: def get_bucket_for(self, node):
          
          for index, bucket in enumerate(self.buckets):
              if node.long_id < bucket.range[1]:
                  return index
          # we should never be here, but make linter happy
          return None
docs: Get the index of the bucket that the given node would fall into.