def update(self, name=None, description=None, privacy_policy=None,<EOL>subscription_policy=None, is_managed=None):
with db.session.begin_nested():<EOL><INDENT>if name is not None:<EOL><INDENT>self.name = name<EOL><DEDENT>if description is not None:<EOL><INDENT>self.description = description<EOL><DEDENT>if (<EOL>privacy_policy is not None and<EOL>PrivacyPolicy.validate(privacy_policy)<EOL>):<EOL><INDENT>self.privacy_policy = privacy_policy<EOL><DEDENT>if (<EOL>subscription_policy is not None and<EOL>SubscriptionPolicy.validate(subscription_policy)<EOL>):<EOL><INDENT>self.subscription_policy = subscription_policy<EOL><DEDENT>if is_managed is not None:<EOL><INDENT>self.is_managed = is_managed<EOL><DEDENT>db.session.merge(self)<EOL><DEDENT>return self<EOL>
Update group.

        :param name: Name of group.
        :param description: Description of group.
        :param privacy_policy: PrivacyPolicy
        :param subscription_policy: SubscriptionPolicy
        :returns: Updated group