code: def test_userstash_update(
      root_domain_client,
      user_stash: UserStash,
      guest_user: User,
      update_user: UserUpdate,
  ) -> None:
      # prepare: add mock data
      user = add_mock_user(root_domain_client, user_stash, guest_user)
  
      update_kwargs = update_user.to_dict(exclude_empty=True).items()
  
      for field_name, value in update_kwargs:
          setattr(user, field_name, value)
  
      result = user_stash.update(
          root_domain_client.credentials.verify_key, user=user
      )
      assert result.is_ok()
      updated_user = result.ok()
      assert isinstance(updated_user, User)
      assert user == updated_user
  
file_path: PySyft/packages/syft/tests/syft/users/user_stash_test.py
imports: from faker import Faker
  from syft.node.credentials import SyftSigningKey
  from syft.service.response import SyftSuccess
  from syft.service.user.user import User
  from syft.service.user.user import UserUpdate
  from syft.service.user.user_roles import ServiceRole
  from syft.service.user.user_stash import UserStash
  from syft.types.uid import UID
label_desc: Use image node_id 10 for calling a global function with example usage: test_userstash_update(root_domain_client, user_stash, guest_user, update_user) without return types