def METHOD_NAME(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 = METHOD_NAME(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])