<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_group_name_nonetrick(self, group_name = None):
 """ In all getter function in case of single payment group, group_name can be None """

        groups = self.m["groups"]
        if (len(groups) == 0):
            raise Exception("Cannot find any groups in metadata")
        if (not group_name):
            if (len(groups) > 1):
                raise Exception("We have more than one payment group in metadata, so group_name should be specified")
            return groups[0]["group_name"]
        return group_name