class_docstr: Tests for memory leaks in NLU components when training with many epochs.
code: def function_to_profile(self) -> None:
      import rasa.model_training
  
      with TempDirectoryPath(get_temp_dir_name()) as temp_dir:
          rasa.model_training.train_nlu(
              _custom_default_config(temp_dir, epochs=self.epochs),
              Path(
                  "data", "test_nlu_no_responses", "sara_nlu_data.yml"
              ),
              output=temp_dir,
          )
  
imports: import abc
  import json
  import subprocess
  import sys
  import time
  from pathlib import Path
  from typing import Text, List, Tuple, Optional, Union
  import memory_profiler
  import psutil
  import pytest
  import rasa
  import rasa.shared.utils.io
  from rasa.utils.common import TempDirectoryPath, get_temp_dir_name
label_desc: Use image node_id 3 for calling the TestNLULeakManyEpochs obj's underlying member method code with example usage: obj.function_to_profile() without return types