code: def test_validation():
      with pytest.raises(
          AssertionError, match=ErrorMessages.INVALID_LOCAL_PATH.value
      ):
          FrameworkProfile(local_path=10)
  
      with pytest.raises(
          AssertionError,
          match=ErrorMessages.INVALID_FILE_MAX_SIZE.value,
      ):
          FrameworkProfile(file_max_size=100.5)
  
      with pytest.raises(
          AssertionError,
          match=ErrorMessages.INVALID_FILE_CLOSE_INTERVAL.value,
      ):
          FrameworkProfile(file_close_interval=-1)
  
      with pytest.raises(
          AssertionError,
          match=ErrorMessages.INVALID_FILE_OPEN_FAIL_THRESHOLD.value,
      ):
          FrameworkProfile(file_open_fail_threshold=2.3)
  
      with pytest.raises(
          AssertionError, match=ErrorMessages.INVALID_START_STEP.value
      ):
          FrameworkProfile(start_step=6.8)
  
      with pytest.raises(
          AssertionError, match=ErrorMessages.INVALID_NUM_STEPS.value
      ):
          FrameworkProfile(num_steps=0)
  
      with pytest.raises(
          AssertionError,
          match=ErrorMessages.INVALID_START_UNIX_TIME.value,
      ):
          FrameworkProfile(start_unix_time=99999999999999)
  
      with pytest.raises(
          AssertionError, match=ErrorMessages.INVALID_DURATION.value
      ):
          FrameworkProfile(duration=0)
  
      with pytest.raises(
          AssertionError,
          match=ErrorMessages.FOUND_BOTH_STEP_AND_TIME_FIELDS.value,
      ):
          FrameworkProfile(start_step=5, duration=20)
  
      with pytest.raises(
          AssertionError,
          match=ErrorMessages.INVALID_METRICS_REGEX.value,
      ):
          DataloaderProfilingConfig(metrics_regex="*")
  
      with pytest.raises(
          AssertionError,
          match=ErrorMessages.INVALID_METRICS_REGEX.value,
      ):
          DataloaderProfilingConfig(metrics_regex=3)
  
      with pytest.raises(
          AssertionError,
          match=ErrorMessages.INVALID_PYTHON_PROFILER.value,
      ):
          PythonProfilingConfig(
              python_profiler="bad_python_profiler",
              profile_default_steps=True,
          )
  
      with pytest.raises(
          AssertionError,
          match=ErrorMessages.INVALID_CPROFILE_TIMER.value,
      ):
          PythonProfilingConfig(cprofile_timer="bad_cprofile_timer")
  
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 43 for calling a global function with example usage: test_validation() without return types