def annotate_binary_op_helper(
    model: _torch.fx.GraphModule,
    binary_ops: _List[_Callable],
    quantization_config: _Optional[_AnnotationConfig],
    filter_fn: _Optional[_Callable[[_Node], bool]] = None,
) -> _Optional[_List[_List[_Node]]]:
    """
    A helper function for annotating all patterns involving binary operations, i.e.,
    using ``quantization_config``.

    input_1 ---
               \
                --> binary_op -> activation -> output
               /
    input_2 ---

    activation may or may not be applied in the pattern.
    """
    annotated_partitions = []

    combinations = _itertools.product(binary_ops, _supported_activations, [True, False])
    for binary_op, act_fn, act_in_place in combinations:
        pattern_gm = get_binary_op_act_pattern(binary_op, act_fn, act_in_place)
        annotated_partitions.extend(
            annotate_binary_op_act_pattern(
                model, pattern_gm, quantization_config, filter_fn
            )
        )

    combinations = _itertools.product(binary_ops, _supported_activations_no_inplace)
    for binary_op, act_fn in combinations:
        pattern_gm = get_binary_op_act_pattern(binary_op, act_fn, act_in_place=False)
        annotated_partitions.extend(
            annotate_binary_op_act_pattern(
                model, pattern_gm, quantization_config, filter_fn
            )
        )

    return annotated_partitions

    A helper function for annotating all patterns involving binary operations, i.e.,
    using ``quantization_config``.

    input_1 ---
                               --> binary_op -> activation -> output
               /
    input_2 ---

    activation may or may not be applied in the pattern.
    
coremltools/optimize/torch/quantization/_coreml_quantizer_utils.py