docstr: Register an optimizer path for the backend.
  
  Note that user-provided optimizers registered without specifying any flow will not be invoked.
  
  Args:
      name (str): Name of the optimizer
      opt_cls (class): Optimizer class
      flow (str, list or tuple, optional): Existing flow(s) to add the optimizer to. Defaults to None.
docstr_tok: ["Register","an","optimizer","path","for","the","backend",".","Note","that","user-provided","optimizers","registered","without","specifying","any","flow","will","not","be","invoked",".","Args",":","name","(","str",")",":","Name","of","the","optimizer","opt_cls","(","class",")",":","Optimizer","class","flow","(","str",",","list","or","tuple",",","optional",")",":","Existing","flow","(","s",")","to","add","the","optimizer","to",".","Defaults","to","None","."]
code: def register_pass(self, name, opt_cls, flow=None):
      """Register an optimizer path for the backend.
  
      Note that user-provided optimizers registered without specifying any flow will not be invoked.
  
      Args:
          name (str): Name of the optimizer
          opt_cls (class): Optimizer class
          flow (str, list or tuple, optional): Existing flow(s) to add the optimizer to. Defaults to None.
      """
      opt_name = register_pass(name, opt_cls, backend=self.name)
      if flow is not None:
          if not isinstance(flow, (list, tuple)):
              flow = [flow]
  
          for f in flow:
              update_flow(f, add_optimizers=[opt_name])
  
imports: import inspect
  import os
  from pathlib import Path
  from hls4ml.backends.template import Template
  from hls4ml.model.flow import get_backend_flows, update_flow
  from hls4ml.model.optimizer import LayerOptimizerPass, extract_optimizers_from_object, extract_optimizers_from_path, get_backend_passes, get_optimizer, register_pass
label_desc: Use image node_id 13 for calling the Backend obj's underlying member method code with example usage: obj.register_pass(name, opt_cls, flow) without return types