public static <N extends IMNode<N>> boolean setToEntity(IMNode<N> node) {
    IInternalMNode<N> internalMNode = node.getAsInternalMNode();
    if (!internalMNode.isDevice()) {
      internalMNode.setDeviceInfo(new TreeDeviceInfo<>());
      return true;
    } else {
      return false;
    }
  }
When a measurement, represented by template or MeasurementMNode, is going to be added to a
node, the node should be set to entity. Before invoking this method, lock the related MTree
part first.

@param node node to be transformed
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/MNodeUtils.java