class_docstr: This class handles the parser event from opt_parser.
  When a target statement is matched, an event is triggered,
  we collected necessary information from this event and construct
  the branches as what we want to understand.
docstr: This function constructs branches from op_list.
  The knowledge of how to construct branches is known according
  to what we want to optimize.
docstr_tok: ["This","function","constructs","branches","from","op_list",".","The","knowledge","of","how","to","construct","branches","is","known","according","to","what","we","want","to","optimize","."]
code: def rf_affine(self, op_list):
      """
      This function constructs branches from op_list.
      The knowledge of how to construct branches is known according
      to what we want to optimize.
      """
  
      def set_op(branch, attr, op):
          if getattr(branch, attr) is None:
              setattr(branch, attr, op)
          else:
              raise ValueError("Incorrect branch!")
  
      op_list = [op_list[0], *op_list[1], op_list[2]]
      op_list = [
          op_list[0],
          op_list[1],
          self.rf_mul_add_resolve(
              [
                  self.rf_mul([op_list[2], op_list[3]]),
                  self.rf_add([op_list[4], op_list[5]]),
              ]
          ),
      ]
  
      branch = op_list[2]
      for op in op_list[:2]:
          if branch.batchmatmul.batchmatmul.inputs[0] in op.outputs:
              set_op(branch.batchmatmul, "x", op)
          elif branch.batchmatmul.batchmatmul.inputs[1] in op.outputs:
              set_op(branch.batchmatmul, "w", op)
          if branch.add2 is not None:
              if branch.add2.add2.inputs[0] in op.outputs:
                  set_op(branch.add2, "x", op)
              elif branch.add2.add2.inputs[1] in op.outputs:
                  set_op(branch.add2, "bias", op)
      return AffineResolver(branch)
  
imports: import nnabla
label_desc: Use image node_id 6 for calling the OptimizerBuilder obj's underlying member method code with example usage: obj.rf_affine(op_list) and returns: AffineResolver