code: def do_remove(model, node, layers):
      node_obj = [
          n for n in list(model.get_layers()) if n.name == node
      ][0]
      model.remove_node(node_obj)
      iRemove = np.argwhere(layers == node)[0][0]
      layers = np.delete(layers, iRemove)
      return model, layers
  
file_path: hls4ml/test/pytest/test_graph.py
imports: from pathlib import Path
  import numpy
  import pytest
  import tensorflow
  import hls4ml
label_desc: Use image node_id 5 for calling a global function with example usage: do_remove(model, node, layers) and returns: model,  layers