code: def test_mxnet_with_default_profiler_config_and_profiler_rule(
      sagemaker_session,
      mxnet_training_latest_version,
      mxnet_training_latest_py_version,
      cpu_instance_type,
  ):
      with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
          script_path = os.path.join(
              DATA_DIR, "mxnet_mnist", "mnist_gluon.py"
          )
          data_path = os.path.join(DATA_DIR, "mxnet_mnist")
  
          mx = MXNet(
              entry_point=script_path,
              role="SageMakerRole",
              framework_version=mxnet_training_latest_version,
              py_version=mxnet_training_latest_py_version,
              instance_count=1,
              instance_type=cpu_instance_type,
              sagemaker_session=sagemaker_session,
          )
  
          train_input = mx.sagemaker_session.upload_data(
              path=os.path.join(data_path, "train"),
              key_prefix="integ-test-data/mxnet_mnist/train",
          )
          test_input = mx.sagemaker_session.upload_data(
              path=os.path.join(data_path, "test"),
              key_prefix="integ-test-data/mxnet_mnist/test",
          )
  
          training_job_name = unique_name_from_base(
              "test-profiler-mxnet-training"
          )
          mx.fit(
              inputs={"train": train_input, "test": test_input},
              job_name=training_job_name,
              wait=False,
          )
  
          job_description = mx.latest_training_job.describe()
          assert (
              job_description["ProfilerConfig"]
              == ProfilerConfig(
                  s3_output_path=mx.output_path,
                  system_monitor_interval_millis=500,
              )._to_request_dict()
          )
          assert job_description.get("ProfilingStatus") == "Enabled"
  
          with pytest.raises(ValueError) as error:
              mx.enable_default_profiling()
          assert "Debugger monitoring is already enabled." in str(error)
  
file_path: sagemaker-python-sdk/tests/integ/test_profiler.py
imports: from __future__ import absolute_import
  import os
  import time
  import uuid
  import pytest
  from sagemaker.debugger import DebuggerHookConfig, FrameworkProfile, ProfilerConfig, ProfilerRule, Rule, rule_configs
  from sagemaker.debugger.metrics_config import DetailedProfilingConfig
  from sagemaker.mxnet.estimator import MXNet
  from sagemaker.utils import unique_name_from_base
  from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES
  from tests.integ.timeout import timeout
label_desc: Use image node_id 3 for calling a global function with example usage: test_mxnet_with_default_profiler_config_and_profiler_rule(sagemaker_session, mxnet_training_latest_version, mxnet_training_latest_py_version, cpu_instance_type) without return types