code: def _wait_until_training_can_be_updated(
      sagemaker_client, job_name, poll=5
  ):
      ready_for_updating = _check_secondary_status(
          sagemaker_client, job_name
      )
      while not ready_for_updating:
          time.sleep(poll)
          ready_for_updating = _check_secondary_status(
              sagemaker_client, job_name
          )
  
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 1 for calling a global function with example usage: _wait_until_training_can_be_updated(sagemaker_client, job_name, poll) without return types