code: def mocked_cmd_input(package, text: Text):
      if isinstance(text, str):
          text = [text]
  
      text_generator = itertools.cycle(text)
      i = package._get_user_input
  
      async def mocked_input(*args, **kwargs):
          value = next(text_generator)
          print(f"wrote '{value}' to input")
          return value
  
      package._get_user_input = mocked_input
      try:
          yield
      finally:
          package._get_user_input = i
  
file_path: rasa/tests/core/utilities.py
imports: import itertools
  import contextlib
  import os
  import typing
  from typing import List, Optional, Text, Any, Dict
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.events import UserUttered, Event
  from rasa.shared.core.trackers import DialogueStateTracker
  from rasa.shared.nlu.constants import INTENT_NAME_KEY
label_desc: Use image node_id 3 for calling a global function with example usage: mocked_cmd_input(package, text) and returns: value