docstr: Remove a transpose layer if it doesn't do anything. i.e 1D input and perm = [0]
docstr_tok: ["Remove","a","transpose","layer","if","it","does","n't","do","anything",".","i.e","1D","input","and","perm","=","[","0","]"]
code: def transform(self, model, node):
      """
      Remove a transpose layer if it doesn't do anything. i.e 1D input and perm = [0]
      """
      print(f"Unnessary {node.name} in the model, optimizing ...")
      if not node.get_output_nodes():
          print(
              f"WARNING: {node.name} is the output layer! No rewiring performed."
          )
          model.remove_node(
              node, rewire=False
          )  # Don't rewire if there is no output layer
      else:
          model.remove_node(node, rewire=True)
  
      return True
  
imports: from hls4ml.model.layers import Transpose
  from hls4ml.model.optimizer import OptimizerPass
label_desc: Use image node_id 2 for calling the RemoveUselessTranspose obj's underlying member method code with example usage: obj.transform(model, node) and returns: True