code: def test_settings_allow_guest_registration(
      monkeypatch: MonkeyPatch, faker: Faker
  ) -> None:
      # Create a new worker
  
      verify_key = SyftSigningKey.generate().verify_key
      mock_node_settings = NodeSettingsV2(
          name=faker.name(),
          verify_key=verify_key,
          highest_version=1,
          lowest_version=2,
          syft_version=syft.__version__,
          signup_enabled=False,
          admin_email="info@openmined.org",
          node_side_type=NodeSideType.LOW_SIDE,
          show_warnings=False,
          deployed_on=datetime.now().date().strftime("%m/%d/%Y"),
      )
  
      with mock.patch(
          "syft.Worker.settings",
          new_callable=mock.PropertyMock,
          return_value=mock_node_settings,
      ):
          worker = syft.Worker.named(name=faker.name(), reset=True)
          guest_domain_client = worker.guest_client
          root_domain_client = worker.root_client
  
          email1 = faker.email()
          email2 = faker.email()
  
          response_1 = root_domain_client.register(
              email=email1,
              password="joker123",
              password_verify="joker123",
              name="Joker",
          )
          assert isinstance(response_1, SyftSuccess)
  
          # by default, the guest client can't register new user
          response_2 = guest_domain_client.register(
              email=email2,
              password="harley123",
              password_verify="harley123",
              name="Harley",
          )
          assert isinstance(response_2, SyftError)
  
          assert any(
              user.email == email1 for user in root_domain_client.users
          )
  
      # only after the root client enable other users to signup, they can
      mock_node_settings.signup_enabled = True
      with mock.patch(
          "syft.Worker.settings",
          new_callable=mock.PropertyMock,
          return_value=mock_node_settings,
      ):
          worker = syft.Worker.named(name=faker.name(), reset=True)
          guest_domain_client = worker.guest_client
          root_domain_client = worker.root_client
  
          password = faker.email()
          response_3 = guest_domain_client.register(
              email=email2,
              password=password,
              password_verify=password,
              name=faker.name(),
          )
          assert isinstance(response_3, SyftSuccess)
  
          assert any(
              user.email == email2 for user in root_domain_client.users
          )
  
imports: from copy import deepcopy
  from datetime import datetime
  from unittest import mock
  from faker import Faker
  from pytest import MonkeyPatch
  from result import Err
  from result import Ok
  import syft
  from syft.abstract_node import NodeSideType
  from syft.node.credentials import SyftSigningKey
  from syft.node.credentials import SyftVerifyKey
  from syft.service.context import AuthedServiceContext
  from syft.service.response import SyftError
  from syft.service.response import SyftSuccess
  from syft.service.settings.settings import NodeSettingsUpdate
  from syft.service.settings.settings import NodeSettingsV2
  from syft.service.settings.settings_service import SettingsService
  from syft.service.settings.settings_stash import SettingsStash
  from syft.service.user.user import UserCreate
  from syft.service.user.user_roles import ServiceRole
label_desc: Use image node_id 10 for calling a global function with example usage: test_settings_allow_guest_registration(monkeypatch, faker) without return types