code: def transform(self, model):
      # use `large_fifo_depth = 0` to keep the default fifo depth
      profiling_fifo_depth = getattr(
          self, "profiling_fifo_depth", 100_000
      )
  
      # check axi-stream or io-stream, if not one the 2 exit
      if not (model.config.get_config_value("IOType") == "io_stream"):
          raise RuntimeError(
              "To use this optimization you have to set `IOType` field to `io_stream` in the HLS config"
          )
  
      # initialize all the fifos to `profiling_fifo_depth` so that they will be automatically implemented in BRAMs
      # and so they will be profiled
      if profiling_fifo_depth:
          vars_to_profile = {
              k: v
              for k, v in model.output_vars.items()
              if v != model.get_output_variables()[0]
              and v != model.get_input_variables()[0]
          }
  
          set_big_fifos(vars_to_profile, profiling_fifo_depth)
  
      data = get_vcd_data(model)
  
      if len(data["children"]) == 0:
          print(
              "FIFO depth optimization found no FIFOs implemented using BRAMs in the design, no optimization is possible."
          )
          print("Consider increasing profiling_fifo_depth.")
          return False
  
      n_elem = len(data["children"][0]["children"][0]["children"])
      for i in range(n_elem):
          name = data["children"][0]["children"][0]["children"][i][
              "name"
          ]
          data_p = data["children"][0]["children"][0]["children"][i][
              "children"
          ][0]["data"]
          depth = data["children"][0]["children"][0]["children"][i][
              "children"
          ][1]["data"]
          populate_values(self.values, name, data_p, depth)
  
      maxs = [
          {"name": i["name"], "max": i["max"], "depth": i["depth"]}
          for i in self.values
      ]
  
      generate_max_depth_file(model, maxs)
  
      set_fifo_depth(model, maxs)
  
      print("[hls4ml] - FIFO optimization completed")
      return False
  
file_path: hls4ml/hls4ml/backends/vivado/passes/fifo_depth_optimization.py
imports: import json
  from pyDigitalWaveTools.vcd.parser import VcdParser
  from hls4ml.model.optimizer.optimizer import ConfigurableOptimizerPass, ModelOptimizerPass
label_desc: Use image node_id 2 for calling the FifoDepthOptimization obj's underlying member method code with example usage: obj.transform(model) and returns: False, False