code: def _is_project_admin(
      user: UserModel,
      project: ProjectModel,
  ) -> bool:
      for m in project.members:
          if user.id == m.user_id:
              if m.project_role == ProjectRole.ADMIN:
                  return True
      return False
  
file_path: dstack/src/dstack/_internal/server/services/projects.py
imports: import uuid
  from typing import Awaitable, Callable, List, Optional, Tuple
  from sqlalchemy import delete, select, update
  from sqlalchemy.ext.asyncio import AsyncSession
  from dstack._internal.core.errors import ForbiddenError, ResourceExistsError, ServerClientError
  from dstack._internal.core.models.backends import BackendInfo
  from dstack._internal.core.models.projects import Member, Project
  from dstack._internal.core.models.users import GlobalRole, ProjectRole
  from dstack._internal.server.models import MemberModel, ProjectModel, UserModel
  from dstack._internal.server.schemas.projects import MemberSetting
  from dstack._internal.server.services import users
  from dstack._internal.server.services.backends import get_configurator
  from dstack._internal.server.settings import DEFAULT_PROJECT_NAME
  from dstack._internal.server.utils.common import run_async
  from dstack._internal.utils.common import get_current_datetime
  from dstack._internal.utils.crypto import generate_rsa_key_pair_bytes
  from dstack._internal.utils.logging import get_logger
label_desc: Use image node_id 3 for calling a global function with example usage: _is_project_admin(user, project) and returns: False, True