def _lookup_style(style): if isinstance(style, string_types): return get_style_by_name(style) return style