code: def _get_persist_command(self):
          
          for command in [_SETSID_COMMAND, _NOHUP_COMMAND]:
              try:
                  if command in self._adb.shell(['which',
                                                 command]).decode('utf-8'):
                      return command
              except adb.AdbError:
                  continue
          self.log.warning(
              'No %s and %s commands available to launch instrument '
              'persistently, tests that depend on UiAutomator and '
              'at the same time performs USB disconnection may fail',
              _SETSID_COMMAND, _NOHUP_COMMAND)
          return ''
docs: Check availability and return path of command if available.