def METHOD_NAME(
    team_member: OrganizationMemberTeam, project_ids: Iterable[int]
) -> RpcTeamMember:
    result = RpcTeamMember(
        id=team_member.id,
        slug=team_member.team.slug,
        is_active=team_member.is_active,
        role_id=team_member.get_team_role().id,
        team_id=team_member.team_id,
        project_ids=list(project_ids),
        scopes=list(team_member.get_scopes()),
    )
    return result