code: def _new_model_path_in_same_dir(old_model_path: Text) -> Text:
      return str(
          Path(old_model_path).parent
          / (secrets.token_hex(8) + ".tar.gz")
      )
  
file_path: rasa/tests/acceptance_tests/test_training.py
imports: from pathlib import Path
  import secrets
  from typing import Text
  import rasa
  from rasa.shared.core.domain import Domain
  from rasa.shared.utils.io import write_yaml
label_desc: Use image node_id 1 for calling a global function with example usage: _new_model_path_in_same_dir(old_model_path) and returns: str