public Map<PartialPath, List<Integer>> constructSchemaBlackListWithTemplate(
      final Map<PartialPath, List<Integer>> templateSetInfo) throws MetadataException {
    final Map<PartialPath, List<Integer>> resultTemplateSetInfo = new HashMap<>();
    for (final Map.Entry<PartialPath, List<Integer>> entry : templateSetInfo.entrySet()) {
      try (final EntityUpdater<?> updater =
          new EntityUpdater<IMemMNode>(
              rootNode, entry.getKey(), store, false, SchemaConstant.ALL_MATCH_SCOPE) {

            @Override
            protected void updateEntity(final IDeviceMNode<IMemMNode> node) {
              if (entry.getValue().contains(node.getSchemaTemplateId())) {
                resultTemplateSetInfo.put(
                    node.getPartialPath(), Collections.singletonList(node.getSchemaTemplateId()));
                node.preDeactivateSelfOrTemplate();
              }
            }
          }) {
        updater.update();
      }
    }
    return resultTemplateSetInfo;
  }
Get node by the path

@return last node in given seriesPath
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/MTreeBelowSGMemoryImpl.java