code: public boolean checkKeyBelongsToNode(byte[] key, int nodeId) {
          List<Integer> nodePartitions = cluster.getNodeById(nodeId).getPartitionIds();
          List<Integer> replicatingPartitions = getReplicatingPartitionList(key);
          // remove all partitions from the list, except those that belong to the
          // node
          replicatingPartitions.retainAll(nodePartitions);
          return replicatingPartitions.size() > 0;
      }
docs: Determines if the key replicates to the given node
  
  @param key
  @param nodeId
  @return true if the key belongs to the node as some replica