code: def _upload_captured_data_to_endpoint(sagemaker_session, predictor):
      current_hour_date_time = datetime.now()
      previous_hour_date_time = datetime.now() - timedelta(hours=1)
      current_hour_folder_structure = current_hour_date_time.strftime(
          "%Y/%m/%d/%H"
      )
      previous_hour_folder_structure = previous_hour_date_time.strftime(
          "%Y/%m/%d/%H"
      )
      s3_uri_base = os.path.join(
          "s3://",
          sagemaker_session.default_bucket(),
          _MODEL_MONITOR_S3_PATH,
          _DATA_CAPTURE_S3_PATH,
          predictor.endpoint_name,
          "AllTraffic",
      )
      s3_uri_previous_hour = os.path.join(
          s3_uri_base, previous_hour_folder_structure
      )
      s3_uri_current_hour = os.path.join(
          s3_uri_base, current_hour_folder_structure
      )
      S3Uploader.upload(
          local_path=os.path.join(
              DATA_DIR, "monitor/captured-data.jsonl"
          ),
          desired_s3_uri=s3_uri_previous_hour,
          sagemaker_session=sagemaker_session,
      )
      S3Uploader.upload(
          local_path=os.path.join(
              DATA_DIR, "monitor/captured-data.jsonl"
          ),
          desired_s3_uri=s3_uri_current_hour,
          sagemaker_session=sagemaker_session,
      )
  
imports: from __future__ import absolute_import
  import json
  import os
  import uuid
  import time
  import pytest
  import tests.integ
  import tests.integ.timeout
  from sagemaker.s3 import S3Uploader
  from datetime import datetime, timedelta
  from tests.integ import DATA_DIR
  from sagemaker.model_monitor import DatasetFormat
  from sagemaker.model_monitor import MonitoringDatasetFormat
  from sagemaker.model_monitor import NetworkConfig, Statistics, Constraints
  from sagemaker.model_monitor import ModelMonitor
  from sagemaker.model_monitor import DefaultModelMonitor
  from sagemaker.model_monitor import MonitoringOutput
  from sagemaker.model_monitor import DataCaptureConfig
  from sagemaker.model_monitor import BatchTransformInput
  from sagemaker.model_monitor import DataQualityMonitoringConfig
  from sagemaker.model_monitor import DataQualityDistributionConstraints
  from sagemaker.model_monitor.data_capture_config import _MODEL_MONITOR_S3_PATH
  from sagemaker.model_monitor.data_capture_config import _DATA_CAPTURE_S3_PATH
  from sagemaker.model_monitor import CronExpressionGenerator
  from sagemaker.model_monitor.monitoring_alert import MonitoringAlertSummary
  from sagemaker.processing import ProcessingInput
  from sagemaker.processing import ProcessingOutput
  from sagemaker.tensorflow.model import TensorFlowModel
  from sagemaker.utils import unique_name_from_base
  from tests.integ.kms_utils import get_or_create_kms_key
  from tests.integ.retry import retries
label_desc: Use image node_id 30 for calling a global function with example usage: _upload_captured_data_to_endpoint(sagemaker_session, predictor) without return types