Because of the temporary Slack outage I wasn't able to post this before so here we go ...
You can find an example Python script here
https://gist.github.com/juanbrny/5ec4c68bfef677985e4f3caa831b95c9 and a Bash version here:
https://gist.github.com/juanbrny/134afd1e93947f2dbb53ae71eeac9999
(Just to contextualize this, the membership of a cluster to an specific cluster group in fleet is dynamic, that means that theres no place where that info is stored)
The script does dynamic membership calculation using the rules defined in the cluster group and shows all the members of the group provided as param. With this you can play to add your own logic and check if a cluster is member of the provided cluster group.
All that should also be posible applying the same logic but querying the objects through the REST API.
Hope it helps ...