<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def group_statistics(self, group, selected_meta, stat_code='mean'):
 """ Provides statistics of a group based on the meta data selected. :param group:The result of a classification or clustering.rst or biclustering algorithm :param selected_meta: The metadata that we are interested in :param stat_code: 'mean' for mean or 'variance' for variance or 'std' for standard deviation :return: returns the statistics properties of the selected metadata """

        values = self.get_values(group, selected_meta)
        if stat_code == 'mean':
            res = statistics.mean(values)
        elif stat_code == 'variance':
            res = statistics.variance(values)
        elif stat_code == 'std':
            res = statistics.stdev(values)
        return res