code: def test_prepare_credentials_if_already_valid(tmpdir: Path):
      credentials_path = str(tmpdir / "credentials.yml")
  
      credentials = {
          "rasa": {"url": "my-custom-url"},
          "another-channel": {"url": "some-url"},
      }
      rasa.shared.utils.io.write_yaml(credentials, credentials_path)
  
      x._prepare_credentials_for_rasa_x(credentials_path)
  
      actual = rasa.shared.utils.io.read_config_file(credentials_path)
  
      assert actual == credentials
  
imports: from pathlib import Path
  import sys
  import argparse
  import pytest
  from typing import Callable
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.pytester import RunResult
  from aioresponses import aioresponses
  import rasa.shared.utils.io
  from rasa.cli import x
  from rasa.utils.endpoints import EndpointConfig
  from rasa.core.utils import AvailableEndpoints
  import rasa.version
  from tests.cli.conftest import RASA_EXE
label_desc: Use image node_id 3 for calling a global function with example usage: test_prepare_credentials_if_already_valid(tmpdir) without return types