public function getNodeByKey($key): ?Node {
        $arrayIndex = $this->getBucketIndex($key);
        /*
         * the list is requested from the array based on
         * the array index hash.
         */
        /** @var SinglyLinkedList $list */
        if (!isset($this->bucket[$arrayIndex])) {
            return null;
        }
        $list = $this->bucket[$arrayIndex];
        if (!$list->containsKey($key)) {
            return null;
        }
        $node = $list->getNodeByKey($key);
        return $node;
    }