parameters: (preset=None)
return_statement: return devices[0]
docstring: Returns a device serial to connect to.  If |preset| is specified it will
      return |preset| if it is connected and |None| otherwise.  If |preset| is not
      specified it will return the first connected device.
docstring_summary: Returns a device serial to connect to.  If |preset| is specified it will
      return |preset| if it is connected and |None| otherwise.  If |preset| is not
      specified it will return the first connected device.
docstring_tokens: Returns a device serial to connect to . If |preset| is specified it will return |preset| if it is connected and |None| otherwise . If |preset| is not specified it will return the first connected device .
function: def GetDeviceToTrack(preset=None):
      """Returns a device serial to connect to.  If |preset| is specified it will
      return |preset| if it is connected and |None| otherwise.  If |preset| is not
      specified it will return the first connected device."""
      devices = [d.adb.GetDeviceSerial()
                 for d in device_utils.DeviceUtils.HealthyDevices()]
      if not devices:
        return None
  
      if preset:
        return preset if preset in devices else None
  
      return devices[0]
function_tokens: def GetDeviceToTrack ( preset = None ) : devices = [ d . adb . GetDeviceSerial ( ) for d in device_utils . DeviceUtils . HealthyDevices ( ) ] if not devices : return None if preset : return preset if preset in devices else None return devices [ 0 ]