def METHOD_NAME(self):
    import serial
    self.interface = self.input_dev.interface
    self.logger.debug(f"K30 Interface: {self.interface}")
    if self.interface == 'UART':
        if self.input_dev.uart_location and is_device(self.input_dev.uart_location):
            try:
                self.sensor = serial.Serial(
                    port=self.input_dev.uart_location,
                    baudrate=self.input_dev.baud_rate,
                    timeout=1,
                    writeTimeout=5)
            except serial.SerialException:
                self.logger.exception('Opening serial')
        else:
            self.logger.error('Could not open "{dev}". Check the device location is correct.'.format(
                dev=self.input_dev.uart_location))
    elif self.interface == 'I2C':
        self.sensor = K30Sensor(bus=f"/dev/i2c-{self.input_dev.i2c_bus}", logger=self.logger)