def _convert_dconstr(model, dconstr, pressure_scale):
    """helper for ``_convert_optimization``"""
    otype = dconstr.type
    if otype == 'DCONSTR':
        dresp = dconstr.dresp_id_ref
        if dresp.type == 'DRESP1':
            response_type = dresp.rtype
            assert len(dresp.atti) == 1, dresp.atti
            for atti in dresp.atti:
                if response_type == 'STRESS':
                    scale = pressure_scale
                else:
                    raise RuntimeError(atti)
        elif dresp.type == 'DRESP2':
            msg = 'skipping:\n%s%s' % (str(dconstr), str(dresp))
            model.log.warning(msg)
            return
        else:
            raise NotImplementedError(dresp)
        dconstr.lid *= scale
        dconstr.uid *= scale
        dconstr.lowfq = scale
        dconstr.highfq = scale
    else:
        raise NotImplementedError(dconstr)
