<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_securitygroup_rules(self, group_id, rules):
 """Add rules to a security group :param int group_id: The ID of the security group to add the rules to :param list rules: The list of rule dictionaries to add """

        if not isinstance(rules, list):
            raise TypeError("The rules provided must be a list of dictionaries")
        return self.security_group.addRules(rules, id=group_id)