'Convenience function for building a Cookie HTTP header value.'

@classmethod
def get_cookie_string(cls, url, user_agent=None, **kwargs):

    (tokens, user_agent) = cls.get_tokens(url, user_agent=user_agent, **kwargs)
    return (';    '.join(('='.join(pair) for pair in tokens.items())), user_agent)
