'Give the user a URL that they can visit to authenticate and obtain a
code.  This method will ask for that code that the user can paste in.
Mocked in libcloud.test.common.google.GoogleTestCase.
:return:  Code supplied by the user after authenticating
:rtype:   ``str``'

def get_code(self):

    auth_params = {'response_type': 'code', 'client_id': self.user_id, 'redirect_uri': self.redirect_uri, 'scope': self.scopes, 'state': 'Libcloud    Request'}
    if self.login_hint:
        auth_params['login_hint'] = self.login_hint
    data = urlencode(auth_params)
    url = ('https://%s%s?%s' % (self.host, self.auth_path, data))
    print '\nPlease    Go    to    the    following    URL    and    sign    in:'
    print url
    if PY3:
        code = input('Enter    Code:    ')
    else:
        code = raw_input('Enter    Code:    ')
    return code
