<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reboot_adb_server():
 """ execute 'adb devices' to start adb server """

    _reboot_count = 0
    _max_retry = 1

    def _reboot():
        nonlocal _reboot_count
        if _reboot_count >= _max_retry:
            raise RuntimeError('fail after retry {} times'.format(_max_retry))
        _reboot_count += 1

        return_code = subprocess.call(['adb', 'devices'], stdout=subprocess.DEVNULL)
        if bool(return_code):
            warnings.warn('return not zero, execute "adb version" failed')
            raise EnvironmentError('adb did not work :(')

    return _reboot