public static function removeNonPkValues(Node $node) {
    $mapper = $node->getMapper();
    $pkValues = $mapper->getPkNames();
    $valueNames = $node->getValueNames();
    foreach($valueNames as $name) {
      if (!in_array($name, $pkValues)) {
        $node->removeValue($name);
      }
    }
  }