def add_to_group(self, group):

        if self.debug:
            self.log.debug("Received request to add this shot to the %s group",
                           group)

        if type(group) is str:

            try:
                group = self.machine.shot_groups[group]
            except __HOLE__:
                if self.debug:
                    self.log.debug("'%s' is not a valid shot_group name.",
                                   group)
                return

        self.groups.add(group)
dataset/ETHPy150Open missionpinball/mpf/mpf/devices/shot.py/Shot.add_to_group