<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _template(self, blueprint):
 """Generates a suitable template based on whether or not an S3 bucket is set. If an S3 bucket is set, then the template will be uploaded to S3 first, and CreateStack/UpdateStack operations will use the uploaded template. If not bucket is set, then the template will be inlined. """

        if self.bucket_name:
            return Template(url=self.s3_stack_push(blueprint))
        else:
            return Template(body=blueprint.rendered)