class_docstr: The configuration for framework metrics to be collected for Python profiling.
docstr: Convert the Python profiling config to a dictionary.
  
  Build off of the base metrics configuration
  dictionary to add the Python profiler and cProfile timer.
  
  Returns:
      dict: The python profiling config as a dictionary.
docstr_tok: ["Convert","the","Python","profiling","config","to","a","dictionary",".","Build","off","of","the","base","metrics","configuration","dictionary","to","add","the","Python","profiler","and","cProfile","timer",".","Returns",":","dict",":","The","python","profiling","config","as","a","dictionary","."]
code: def _to_json(self):
      """Convert the Python profiling config to a dictionary.
  
      Build off of the base metrics configuration
      dictionary to add the Python profiler and cProfile timer.
  
      Returns:
          dict: The python profiling config as a dictionary.
  
      """
      python_profiling_config = super()._to_json()
      python_profiling_config[
          "ProfilerName"
      ] = self.python_profiler.value
      if self.cprofile_timer is not None:
          python_profiling_config[
              "cProfileTimer"
          ] = self.cprofile_timer.value
      return python_profiling_config
  
imports: from __future__ import absolute_import
  from sagemaker.debugger.profiler_constants import 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
  from sagemaker.debugger.utils import convert_json_config_to_string, cProfileTimer, is_valid_regex, is_valid_unix_time, ErrorMessages, PythonProfiler
label_desc: Use image node_id 2 for calling the PythonProfilingConfig obj's underlying member method code with example usage: obj._to_json() and returns: python_profiling_config