<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _css_rules_to_string(self, rules):
 """given a list of css rules returns a css string """

        lines = []
        for item in rules:
            if isinstance(item, tuple):
                k, v = item
                lines.append("%s {%s}" % (k, make_important(v)))
            # media rule
            else:
                for rule in item.cssRules:
                    if isinstance(
                        rule,
                        (
                            cssutils.css.csscomment.CSSComment,
                            cssutils.css.cssunknownrule.CSSUnknownRule,
                        ),
                    ):
                        continue
                    for key in rule.style.keys():
                        rule.style[key] = (
                            rule.style.getPropertyValue(key, False),
                            "!important",
                        )
                lines.append(item.cssText)
        return "\n".join(lines)