Adding function for checking if a node is in a bucket