code: def split_prefix(leaf, start_pos):
      line, column = start_pos
      start = 0
      value = spacing = ""
      bom = False
      while start != len(leaf.prefix):
          match = _regex.match(leaf.prefix, start)
          spacing = match.group(1)
          value = match.group(2)
          if not value:
              break
          type_ = _types[value[0]]
          yield PrefixPart(
              leaf,
              type_,
              value,
              spacing,
              start_pos=(
                  line,
                  column + start - int(bom) + len(spacing),
              ),
          )
          if type_ == "bom":
              bom = True
  
          start = match.end(0)
          if value.endswith("\n"):
              line += 1
              column = -start
  
      if value:
          spacing = ""
      yield PrefixPart(
          leaf, "spacing", spacing, start_pos=(line, column + start)
      )
  
file_path: catboost/contrib/python/parso/py2/parso/python/prefix.py
imports: import re
  from codecs import BOM_UTF8
  from parso.python.tokenize import group
label_desc: Use image node_id 1 for calling a global function with example usage: split_prefix(leaf, start_pos) without return types