Matchmaker - team based selection

Hey everyone,
We have been using Nakama and its matchmaking in our game successfully for 1vs1 matches. What we have done previously was that we have assigned an ELO based on the hero they pick and match players in 1vs1 matches using that ELO and a range for matching between themselves.

Now that we have introduced 2vs2 games, we want each team to have a hero once but the opposite team can also have that hero in their team.

For example lets say that [A B C D E] are the hero options to pick in a match.
As a player, I picked A and I want a random player in my team that can have either one of the [B C D E] options.
The opposite team’s players are free to chose anything they like(unless they picked the same hero). I don’t want to apply any constraints for them based on my team.

If we were to say that each hero can be picked once in the match for either teams, we could have done it easily like this;

var stringProperties = new Dictionary<string, string>() {
    {"hero", "A"}
var query = "+properties.hero:=[B, C, D, E]";

But now that there is the element of “team” here, where we only want to constraint our team mate (who we have no idea who is) to be able to pick one of the options, how can we do this?
Any help would be appreciated.