code: def _css_rules_to_string(self, rules):
          
          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)
docs: given a list of css rules returns a css string