def __init__(self, report_name, app_id, source_type, report_source_id, existing_report=None, *args, **kwargs):
        super(ConfigureBarChartReportForm, self).__init__(
            report_name, app_id, source_type, report_source_id, existing_report, *args, **kwargs
        )
        if self.source_type == "form":
            self.fields['group_by'].widget = QuestionSelect(attrs={'class': 'input-large'})
        else:
            self.fields['group_by'].widget = Select2(attrs={'class': 'input-large'})
        self.fields['group_by'].choices = self._group_by_choices

        # Set initial value of group_by
        if self.existing_report:
            existing_agg_cols = existing_report.aggregation_columns
            assert len(existing_agg_cols) < 2
            if existing_agg_cols:
                self.fields['group_by'].initial = self._get_property_from_column(existing_agg_cols[0])
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/userreports/reports/builder/forms.py/ConfigureBarChartReportForm.__init__/original