code: def get_onnx_input_name(node, graph):
      """
      In ONNX, when calling node.input, it returns the node input's index in the graph instead of the input's name.
      However, the input's name is used for indexing in ModelGraph's graph. This function return the input node's name instead.
      """
  
      in_node = [
          in_node
          for in_node in graph.node
          if (in_node.output[0] in node.input)
      ]
  
      if in_node:
          if in_node[0].op_type != "Flatten":
              input_node_name = [x.name for x in in_node]
          else:  # IF it's a flatten
              input_node_name = [
                  x.name
                  for x in graph.node
                  if (x.output[0] in in_node[0].input)
              ]
  
          return input_node_name
  
      else:  # If there is no input name it's actually the first layer
          return [replace_char_inconsitency(node.input[0])]
  
imports: import numpy
  import onnx
  from onnx import helper, numpy_helper, shape_inference
  from hls4ml.model import ModelGraph
label_desc: Use image node_id 10 for calling a global function with example usage: get_onnx_input_name(node, graph) and returns: input_node_name, list