code: def test_init_existing_login(runner, user):
      with runner.isolated_filesystem():
          with open("netrc", "w") as f:
              f.write(
                  f"machine localhost\n\tlogin {user}\tpassword {user}"
              )
          result = runner.invoke(cli.init, input="y\nvanpelt\nfoo\n")
          print(result.output)
          print(result.exception)
          print(traceback.print_tb(result.exc_info[2]))
          assert result.exit_code == 0
          with open("wandb/settings") as f:
              generated_wandb = f.read()
          assert user in generated_wandb
          assert "This directory is configured" in result.output
  
file_path: wandb/tests/pytest_tests/system_tests/test_core/test_cli_full.py
imports: import netrc
  import os
  import traceback
  from unittest import mock
  import pytest
  import wandb
  from wandb.cli import cli
label_desc: Use image node_id 5 for calling a global function with example usage: test_init_existing_login(runner, user) without return types