<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _delete_security_groups(self):
 """ Delete the security groups for each role in the cluster, and the group for the cluster. """

    group_names = self._get_all_group_names_for_cluster()
    for group in group_names:
      self.ec2.delete_security_group(group)