code: def _split_format(cls, source):
      if _isNonStrSequence(source):
          assert (
              len(source) > 0
          ), f"{cls} needs at least format from {source}"
          fmt, remainder = source[0], source[1:]
      elif isinstance(source, collections.abc.Mapping):
          assert (
              "Format" in source
          ), f"{cls} needs at least Format from {source}"
          remainder = source.copy()
          fmt = remainder.pop("Format")
      else:
          raise ValueError(
              f"Not sure how to populate {cls} from {source}"
          )
  
      assert isinstance(
          fmt, collections.abc.Hashable
      ), f"{cls} Format is not hashable: {fmt!r}"
      assert (
          fmt in cls.convertersByName
      ), f"{cls} invalid Format: {fmt!r}"
  
      return fmt, remainder
  
file_path: catboost/contrib/python/fonttools/fontTools/colorLib/table_builder.py
imports: import collections
  import enum
  from fontTools.ttLib.tables.otBase import BaseTable, FormatSwitchingBaseTable, UInt8FormatSwitchingBaseTable
  from fontTools.ttLib.tables.otConverters import ComputedInt, SimpleValue, Struct, Short, UInt8, UShort, IntValue, FloatValue, OptionalValue
  from fontTools.misc.roundTools import otRound
label_desc: Use image node_id 3 for calling a global function with example usage: _split_format(cls, source) and returns: fmt,  remainder