code: def _write_ticket(filename, status="waiting"):
      file_path = "ci-integ-queue/{}".format(status)
      if not os.path.exists(file_path):
          os.makedirs(file_path)
  
      file_full_path = file_path + "/" + filename
      with open(file_full_path, "w") as file:
          file.write(filename)
      s3_file_obj = (
          boto3.Session()
          .resource("s3")
          .Object(bucket_name, file_full_path)
      )
      s3_file_obj.upload_file(file_full_path)
      print("Build %s is now in state %s" % (filename, status))
      return s3_file_obj
  
file_path: sagemaker-python-sdk/ci-scripts/queue_build.py
imports: from __future__ import absolute_import
  import os
  import re
  import time
  import boto3
label_desc: Use image node_id 9 for calling a global function with example usage: _write_ticket(filename, status) and returns: s3_file_obj