public static function isFeatureFlagValid($config, $featureFlag)
    {
        $experimentIds = $featureFlag->getExperimentIds();

        if (empty($experimentIds)) {
            return true;
        }
        if (sizeof($experimentIds) == 1) {
            return true;
        }

        $groupId = $config->getExperimentFromId($experimentIds[0])->getGroupId();
        foreach ($experimentIds as $id) {
            $experiment = $config->getExperimentFromId($id);
            $grpId = $experiment->getGroupId();
            if ($groupId != $grpId) {
                return false;
            }
        }

        return true;
    }