Is there any way to deal with group info in custom logloss data

My training goal is group will be labeled as true positive if one sample in one group get true positive result, is there any way to change custom logloss function to fit this goal?