<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def interface(self, value):
 """ Sets the interface used to connect to the device. :param value: may specify either the serial number or the device index :type value: string or int """

        self._interface = value
        if isinstance(value, int):
            self._device_number = value
        else:
            self._serial_number = value