code: def test_invite_as_non_admin(self, environment: "Environment"):
      project_name = a_project_name(
          project_slug=f"{fake.slug()}-invitation"
      )
      project_identifier = normalize_project_name(
          name=project_name, workspace=environment.workspace
      )
  
      created_project_identifier = create_project(
          name=project_name,
          workspace=environment.workspace,
          api_token=environment.user_token,
      )
  
      assert created_project_identifier == project_identifier
      assert created_project_identifier in get_project_list(
          api_token=environment.user_token
      )
  
      # user who created a project (`user_token` owner) will be automatically project owner
      sa_is_project_owner = (
          get_project_service_account_list(
              project=created_project_identifier,
              api_token=environment.user_token,
          ).get(environment.service_account)
          == "owner"
      )
      user_is_project_owner = (
          get_project_member_list(
              project=created_project_identifier,
              api_token=environment.user_token,
          ).get(environment.user)
          == "owner"
      )
      if sa_is_project_owner and not user_is_project_owner:
          # SA has access to project, so tests are run as SA
          self._test_add_user_to_project_as_sa(
              created_project_identifier, environment
          )
      elif user_is_project_owner and not sa_is_project_owner:
          # SA doesn't have access to project, so tests are run as user
          self._test_add_sa_to_project_as_owner(
              created_project_identifier, environment
          )
      else:
          raise AssertionError(
              "Expected to only SA or user to be owner of newly created project."
          )
  
      delete_project(
          project=created_project_identifier,
          api_token=environment.admin_token,
      )
  
      assert project_identifier not in get_project_list(
          api_token=environment.user_token
      )
  
imports: import time
  from typing import Callable, Dict, List
  import backoff
  import pytest
  from neptune import Project, init_model_version
  from neptune.internal.container_type import ContainerType
  from neptune.management import ProjectVisibility, add_project_member, add_project_service_account, clear_trash, create_project, delete_project, get_project_list, get_project_member_list, get_project_service_account_list, get_workspace_member_list, get_workspace_service_account_list, invite_to_workspace, remove_project_member, remove_project_service_account, trash_objects
  from neptune.management.exceptions import ProjectPrivacyRestrictedException, UserAlreadyInvited, UserNotExistsOrWithoutAccess, WorkspaceOrUserNotFound
  from neptune.management.internal.utils import normalize_project_name
  from neptune.metadata_containers.metadata_containers_table import Table
  from tests.e2e.base import BaseE2ETest, fake
  from tests.e2e.utils import Environment, a_project_name, initialize_container
label_desc: Use image node_id 8 for calling the TestManagement obj's underlying member method code with example usage: obj.test_invite_as_non_admin(environment) without return types