class_docstr: Apply the style transformation depending on a condition.
class_docstr_tok: ["Apply","the","style","transformation","depending","on","a","condition","."]
code: def transform_attrs(self, attrs: Attrs) -> Attrs:
      if self.filter():
          return self.style_transformation.transform_attrs(attrs)
      return attrs
  
imports: from __future__ import annotations
  from abc import ABCMeta, abstractmethod
  from colorsys import hls_to_rgb, rgb_to_hls
  from typing import Callable, Hashable, Sequence
  from prompt_toolkit.cache import memoized
  from prompt_toolkit.filters import FilterOrBool, to_filter
  from prompt_toolkit.utils import AnyFloat, to_float, to_str
  from .base import ANSI_COLOR_NAMES, Attrs
  from .style import parse_color
label_desc: Use image node_id 2 for calling the ConditionalStyleTransformation obj's underlying member method code with example usage: obj.transform_attrs(attrs) and returns: attrs, self