def METHOD_NAME(self, voltage):
    if self.dac_device.get_type()[0:4] == 'IVVI':
        mv = voltage * 1000
        self.dac_device.set_dac(self.dac_port, mv, dacrange=(0, 4000))
    elif self.dac_device.get_type()[0:6] == 'DC_DAC':
        self.dac_device.do_set_voltage(voltage, self.dac_port)