code: def _upload_to_s3(
      s3_client,
      function_name,
      zipped_code_dir,
      s3_bucket,
      s3_key_prefix=None,
  ):
      """Upload the zipped code to S3 bucket provided in the Lambda instance.
  
      Lambda instance must have a path to the zipped code folder and a S3 bucket to upload
      the code. The key will lambda/function_name/code and the S3 URI where the code is
      uploaded is in this format: s3://bucket_name/lambda/function_name/code.
  
      Returns: the S3 key where the code is uploaded.
      """
  
      key = s3.s3_path_join(
          s3_key_prefix,
          "lambda",
          function_name,
          "code",
      )
      s3_client.upload_file(zipped_code_dir, s3_bucket, key)
      return key
  
file_path: sagemaker-python-sdk/src/sagemaker/lambda_helper.py
imports: from __future__ import print_function, absolute_import
  from io import BytesIO
  import zipfile
  import time
  from botocore.exceptions import ClientError
  from sagemaker import s3
  from sagemaker.session import Session
label_desc: Use image node_id 3 for calling a global function with example usage: _upload_to_s3(s3_client, function_name, zipped_code_dir, s3_bucket, s3_key_prefix) and returns: key