(self)
If aggregating by people, returns distinct_id.

        Otherwise, returns the relevant group_key.

        If relevant group is not passed to the flag, None is returned and handled in get_match.
If aggregating by people, returns distinct_id.
If aggregating by people returns distinct_id .
def hashed_identifier(self) -> Optional[str]:
        """
        If aggregating by people, returns distinct_id.

        Otherwise, returns the relevant group_key.

        If relevant group is not passed to the flag, None is returned and handled in get_match.
        """
        if self.feature_flag.aggregation_group_type_index is None:
            return self.distinct_id
        else:
            # :TRICKY: If aggregating by groups
            group_type_name = self.cache.group_type_index_to_name.get(self.feature_flag.aggregation_group_type_index)
            group_key = self.groups.get(group_type_name)  # type: ignore
            return group_key
def hashed_identifier ( self ) -> Optional [ str ] : if self . feature_flag . aggregation_group_type_index is None : return self . distinct_id else : # :TRICKY: If aggregating by groups group_type_name = self . cache . group_type_index_to_name . get ( self . feature_flag . aggregation_group_type_index ) group_key = self . groups . get ( group_type_name ) # type: ignore return group_key