Connect to a device, and return its object
    Args:
        platform: string one of <android|ios|windows>
        
    Returns:
        None

    Raises:
        SyntaxError, EnvironmentError

def connect(*args, **kwargs):
    """Connect to a device, and return its object
    Args:
        platform: string one of <android|ios|windows>
        
    Returns:
        None

    Raises:
        SyntaxError, EnvironmentError
    """
    connect_url = _connect_url(*args)
    platform = kwargs.pop('platform', _detect_platform(connect_url))

    cls = None
    if platform == 'android':
        os.environ['JSONRPC_TIMEOUT'] = "60" # default is 90s which is too long.
        devcls = __import__('atx.drivers.android')
        cls = devcls.drivers.android.AndroidDevice
    elif platform == 'windows':
        devcls = __import__('atx.drivers.windows')
        cls = devcls.drivers.windows.WindowsDevice
    elif platform == 'ios':
        devcls = __import__('atx.drivers.ios_webdriveragent')
        cls = devcls.drivers.ios_webdriveragent.IOSDevice
    elif platform == 'webdriver':
        devcls = __import__('atx.drivers.webdriver')
        cls = devcls.drivers.webdriver.WebDriver
    elif platform == 'dummy': # for py.test use
        devcls = __import__('atx.drivers.dummy')
        cls = devcls.drivers.dummy.DummyDevice
    
    if cls is None:
        raise SyntaxError('Platform: %s not exists' % platform)

    c = cls(connect_url, **kwargs)
    c.platform = platform
    return c