def activation_configs(
    ops: _List[_Any], constraints: _Optional[_DTypeWithConstraints] = None
) -> _List[_BackendPatternConfig]:
    """
    Returns backend pattern configs for default ops like activations which
    do not have an associated weight but can alter the scale and zero point of
    the input tensor.
    """
    dtype_configs = []
    for act_dtype in act_quant_dtype_configs:
        new_act_dtype = _deepcopy(act_dtype)
        if act_dtype.output_dtype == _torch.quint8 and constraints is not None:
            new_act_dtype.output_dtype_with_constraints = constraints
        dtype_configs.append(new_act_dtype)
    return [
        _BackendPatternConfig(op)
        .set_observation_type(_ObservationType.OUTPUT_USE_DIFFERENT_OBSERVER_AS_INPUT)
        .set_dtype_configs(dtype_configs)
        for op in ops
    ]

    Returns backend pattern configs for default ops like activations which
    do not have an associated weight but can alter the scale and zero point of
    the input tensor.
    
coremltools/optimize/torch/quantization/_backend_config_utils.py