code: def generate_stack_policy_args(stack_policy=None):
      
  
      args = {}
      if stack_policy:
          logger.debug("Stack has a stack policy")
          if stack_policy.url:
              # stacker currently does not support uploading stack policies to
              # S3, so this will never get hit (unless your implementing S3
              # uploads, and then you're probably reading this comment about why
              # the exception below was raised :))
              #
              # args["StackPolicyURL"] = stack_policy.url
              raise NotImplementedError
          else:
              args["StackPolicyBody"] = stack_policy.body
      return args
docs: Converts a stack policy object into keyword args.
  
      Args:
          stack_policy (:class:`stacker.providers.base.Template`): A template
              object representing a stack policy.
  
      Returns:
          dict: A dictionary of keyword arguments to be used elsewhere.