code: def _convert_lines_from_ChunkCombinedCode(
      lines: cpy.LineReturn_ChunkCombinedCode,
      line_type_to: LineType,
  ) -> cpy.LineReturn:
      if line_type_to in (LineType.Separate, LineType.SeparateCode):
          separate_lines = []
          for points, codes in zip(*lines):
              if points is not None:
                  if TYPE_CHECKING:
                      assert codes is not None
                  split_at = np.nonzero(codes == MOVETO)[0]
                  if len(split_at) > 1:
                      separate_lines += np.split(points, split_at[1:])
                  else:
                      separate_lines.append(points)
          if line_type_to == LineType.Separate:
              return separate_lines
          else:
              separate_codes = [
                  arr.codes_from_points(line) for line in separate_lines
              ]
              return (separate_lines, separate_codes)
      elif line_type_to == LineType.ChunkCombinedCode:
          return lines
      elif line_type_to == LineType.ChunkCombinedOffset:
          chunk_offsets = [
              None if codes is None else arr.offsets_from_codes(codes)
              for codes in lines[1]
          ]
          return (lines[0], chunk_offsets)
      elif line_type_to == LineType.ChunkCombinedNan:
          points_nan: list[cpy.PointArray | None] = []
          for points, codes in zip(*lines):
              if points is None:
                  points_nan.append(None)
              else:
                  if TYPE_CHECKING:
                      assert codes is not None
                  offsets = arr.offsets_from_codes(codes)
                  points_nan.append(
                      arr.insert_nan_at_offsets(points, offsets)
                  )
          return (points_nan,)
      else:
          raise ValueError(f"Invalid LineType {line_type_to}")
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, cast
  import numpy
  from contourpy._contourpy import FillType, LineType
  import contourpy.array
  from contourpy.enum_util import as_fill_type, as_line_type
  from contourpy.typecheck import check_filled, check_lines
  from contourpy.types import MOVETO, offset_dtype
label_desc: Use image node_id 10 for calling a global function with example usage: _convert_lines_from_ChunkCombinedCode(lines, line_type_to) and returns: separate_lines, separate_lines,  separate_codes, lines, lines,  chunk_offsets, points_nan