public static <N extends IMNode<N>> boolean setToInternal(IDeviceMNode<N> entityMNode) {
    IInternalMNode<N> internalMNode = entityMNode.getAsInternalMNode();
    if (internalMNode.isDevice()) {
      internalMNode.setDeviceInfo(null);
      return true;
    } else {
      return false;
    }
  }
When there's no measurement, represented by template or MeasurementMNode, is under this
entityMNode, it should not act as entity anymore. Before invoking this method, lock related
MTree structure first.

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