code: public boolean deleteDataNode(DataNode node) {
      try {
        rwLock.writeLock().lock();
        if (!dataNodeMap.containsKey(node.getId())) {
          return false;
        }
        //Delete node from dataNodeMap
        dataNodeMap.remove(node.getId());
  
        //Delete all the edges adjacent to the node. First, delete edges from flowEdgeMap and next, remove the edges
        // from nodesToEdges
        for (FlowEdge edge : nodesToEdges.get(node)) {
          flowEdgeMap.remove(edge.getId());
        }
        nodesToEdges.remove(node);
        return true;
  
      } finally {
        rwLock.writeLock().unlock();
      }
    }
docs: Delete a {@DataNode} from the {@link FlowGraph}.
  @param node to be deleted.
  @return true if {@link DataNode} is successfully deleted.