'Returns an authorized http instance.
Can only be called if there are valid credentials for the user, such
as inside of a view that is decorated with @required.
Args:
*args: Positional arguments passed to httplib2.Http constructor.
**kwargs: Positional arguments passed to httplib2.Http constructor.
Raises:
ValueError if no credentials are available.'

def http(self, *args, **kwargs):

    if (not self.credentials):
        raise ValueError('No    credentials    available.')
    return self.credentials.authorize(transport.get_http_object(*args, **kwargs))
