code: def test_create_pytorch_estimator_with_profile_processing(
      sagemaker_session,
      pytorch_training_version,
      pytorch_training_py_version,
      default_framework_profile,
  ):
      profiler_config = ProfilerConfig(
          system_monitor_interval_millis=500,
          profile_params=Profiler(cpu_profiling_duration="3600"),
      )
      assert (
          profiler_config.profile_params.instanceType
          == DETAIL_PROF_PROCESSING_DEFAULT_INSTANCE_TYPE
      )
      assert (
          profiler_config.profile_params.volumeSizeInGB
          == DETAIL_PROF_PROCESSING_DEFAULT_VOLUME_SIZE
      )
  
      profiler_config = ProfilerConfig(
          system_monitor_interval_millis=500,
          profile_params=Profiler(
              cpu_profiling_duration="3600",
          ),
      )
  
      pytorch = PyTorch(
          entry_point=SCRIPT_PATH,
          role=ROLE,
          sagemaker_session=sagemaker_session,
          instance_count=INSTANCE_COUNT,
          instance_type=INSTANCE_TYPE,  # gpu_pytorch_instance_type,
          framework_version=pytorch_training_version,
          py_version=pytorch_training_py_version,
          profiler_config=profiler_config,
      )
      pytorch._prepare_profiler_for_training()
  
      assert pytorch.profiler_rules is not None
      for rule in pytorch.profiler_rules:
          if rule.name is not None and rule.name.startswith(
              "DetailedProfilerProcessingJobConfig"
          ):
              if rule.image_uri.endswith(
                  "detailed-profiler-processing:latest"
              ):
                  return
  
      assert 0
  
imports: from __future__ import absolute_import
  import os
  import pytest
  import re
  import time
  import warnings
  from packaging import version
  from sagemaker import image_uris
  import sagemaker.fw_utils
  from sagemaker.pytorch import PyTorch
  from sagemaker.tensorflow import TensorFlow
  from sagemaker.debugger import get_rule_container_image_uri
  from sagemaker.debugger.profiler_config import FrameworkProfile
  from sagemaker import ProfilerConfig, Profiler
  from sagemaker.debugger.metrics_config import StepRange, TimeRange, DetailedProfilingConfig, DataloaderProfilingConfig, PythonProfilingConfig, HorovodProfilingConfig, SMDataParallelProfilingConfig
  from sagemaker.debugger.profiler_constants import BASE_FOLDER_DEFAULT, CLOSE_FILE_INTERVAL_DEFAULT, FILE_OPEN_FAIL_THRESHOLD_DEFAULT, MAX_FILE_SIZE_DEFAULT, DATALOADER_PROFILING_CONFIG_NAME, DATALOADER_PROFILING_START_STEP_DEFAULT, DETAILED_PROFILING_CONFIG_NAME, DETAILED_PROFILING_START_STEP_DEFAULT, SMDATAPARALLEL_PROFILING_CONFIG_NAME, SMDATAPARALLEL_PROFILING_START_STEP_DEFAULT, HOROVOD_PROFILING_CONFIG_NAME, HOROVOD_PROFILING_START_STEP_DEFAULT, PROFILING_NUM_STEPS_DEFAULT, PYTHON_PROFILING_CONFIG_NAME, PYTHON_PROFILING_NUM_STEPS_DEFAULT, PYTHON_PROFILING_START_STEP_DEFAULT, START_STEP_DEFAULT, DETAIL_PROF_PROCESSING_DEFAULT_INSTANCE_TYPE, DETAIL_PROF_PROCESSING_DEFAULT_VOLUME_SIZE
  from sagemaker.debugger.utils import PythonProfiler, cProfileTimer, ErrorMessages
label_desc: Use image node_id 50 for calling a global function with example usage: test_create_pytorch_estimator_with_profile_processing(sagemaker_session, pytorch_training_version, pytorch_training_py_version, default_framework_profile) without return types