<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def deal_with_changeset_stack_policy(self, fqn, stack_policy):
 """ Set a stack policy when using changesets. ChangeSets don't allow you to set stack policies in the same call to update them. This sets it before executing the changeset if the stack policy is passed in. Args: stack_policy (:class:`stacker.providers.base.Template`):
 A template object representing a stack policy. """

        if stack_policy:
            kwargs = generate_stack_policy_args(stack_policy)
            kwargs["StackName"] = fqn
            logger.debug("Setting stack policy on %s.", fqn)
            self.cloudformation.set_stack_policy(**kwargs)