class_docstr: Clones streams that are used multiple times
class_docstr_tok: ["Clones","streams","that","are","used","multiple","times"]
code: def transform(self, model, node):
      if model.config.get_config_value("IOType") != "io_stream":
          return False
  
      output_map = node.get_output_use_map()
  
      transformed = False
      for output in node.outputs:
          if len(output_map[output]) > 1:
              if len(output_map[output]) > 3:
                  print(
                      "WARNING: Cloning output {} of {} ({}) more than 3 times not currently supported".format(
                          output, node.__class__.__name__, node.name
                      )
                  )
                  return False
              out_var = node.get_output_variable(output)
              for i, layer in enumerate(output_map[output], 1):
                  attrs = {"size": np.prod(out_var.shape)}
                  idx = layer.inputs.index(output)
                  layer.inputs[idx] = output + "_cpy" + str(i)
  
              clone_layer: Clone = model.make_node(
                  Clone,
                  "clone_" + node.name,
                  attrs,
                  [output],
                  [
                      output + "_cpy" + str(i + 1)
                      for i in range(len(output_map[output]))
                  ],
              )
              for i in range(len(output_map[output])):
                  key = output + "_cpy" + str(i + 1)
                  clone_layer.attributes[key].type = node.attributes[
                      "result_t"
                  ]
              model.insert_node(clone_layer)
              transformed = True
  
      return transformed
  
file_path: hls4ml/hls4ml/backends/fpga/passes/clone.py
imports: import numpy
  from hls4ml.backends.template import FunctionCallTemplate
  from hls4ml.model.layers import Layer, register_layer
  from hls4ml.model.optimizer import OptimizerPass
label_desc: Use image node_id 2 for calling the CloneOutput obj's underlying member method code with example usage: obj.transform(model, node) and returns: transformed, False, False