def set(self, name, value, **kwargs):
<EOL>if value is None:<EOL><INDENT>remove_cookie_by_name(self, name, domain=kwargs.get('<STR_LIT>'), path=kwargs.get('<STR_LIT:path>'))<EOL>return<EOL><DEDENT>if isinstance(value, Morsel):<EOL><INDENT>c = morsel_to_cookie(value)<EOL><DEDENT>else:<EOL><INDENT>c = create_cookie(name, value, **kwargs)<EOL><DEDENT>self.set_cookie(c)<EOL>return c<EOL>
Dict-like set() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains.