code: def _flatten_layers(lst):
      for paint in lst:
          if paint["Format"] == ot.PaintFormat.PaintColrLayers:
              yield from _flatten_layers(paint["Layers"])
          else:
              yield paint
  
file_path: catboost/contrib/python/fonttools/fontTools/colorLib/unbuilder.py
imports: from fontTools.ttLib.tables import otTables
  from .table_builder import TableUnbuilder
label_desc: Use image node_id 2 for calling a global function with example usage: _flatten_layers(lst) without return types