code: def set_tif(self, interface):
          
          if not ((1 << interface) & self.supported_tifs()):
              raise errors.JLinkException('Unsupported target interface: %s' % interface)
  
          # The return code here is actually *NOT* the previous set interface, it
          # is ``0`` on success, otherwise ``1``.
          res = self._dll.JLINKARM_TIF_Select(interface)
          if res != 0:
              return False
  
          self._tif = interface
          return True
docs: Selects the specified target interface.
  
          Note that a restart must be triggered for this to take effect.
  
          Args:
            self (Jlink): the ``JLink`` instance
            interface (int): integer identifier of the interface
  
          Returns:
            ``True`` if target was updated, otherwise ``False``.
  
          Raises:
            JLinkException: if the given interface is invalid or unsupported.