code: def test_argilla_credentials_save(mocker: "MockFixture"):
      mocker.patch("builtins.open", new_callable=mocker.mock_open)
  
      ArgillaCredentials(
          api_url="http://unit-test.com:6900",
          api_key="unit.test",
          workspace="unit-tests",
          extra_headers={"X-Unit-Test": "true"},
      ).save()
  
      open.assert_called_once_with(ARGILLA_CREDENTIALS_FILE, "w")
      open().write.assert_called_once_with(
          '{"api_url": "http://unit-test.com:6900", "api_key": "unit.test", "workspace": "unit-tests", "extra_headers": {"X-Unit-Test": "true"}}'
      )
  
file_path: argilla/tests/unit/client/test_login.py
imports: from pathlib import Path
  from typing import TYPE_CHECKING
  import pytest
  from argilla.client.login import ARGILLA_CREDENTIALS_FILE, ArgillaCredentials, login
label_desc: Use image node_id 1 for calling a global function with example usage: test_argilla_credentials_save(mocker) without return types