code: def _convert_filled_from_ChunkCombinedCodeOffset(
      filled: cpy.FillReturn_ChunkCombinedCodeOffset,
      fill_type_to: FillType,
  ) -> cpy.FillReturn:
      if fill_type_to == FillType.OuterCode:
          separate_points = []
          separate_codes = []
          for points, codes, outer_offsets in zip(*filled):
              if points is not None:
                  if TYPE_CHECKING:
                      assert codes is not None
                      assert outer_offsets is not None
                  separate_points += arr.split_points_by_offsets(
                      points, outer_offsets
                  )
                  separate_codes += arr.split_codes_by_offsets(
                      codes, outer_offsets
                  )
          return (separate_points, separate_codes)
      elif fill_type_to == FillType.OuterOffset:
          separate_points = []
          separate_offsets = []
          for points, codes, outer_offsets in zip(*filled):
              if points is not None:
                  if TYPE_CHECKING:
                      assert codes is not None
                      assert outer_offsets is not None
                  separate_points += arr.split_points_by_offsets(
                      points, outer_offsets
                  )
                  separate_codes = arr.split_codes_by_offsets(
                      codes, outer_offsets
                  )
                  separate_offsets += [
                      arr.offsets_from_codes(codes)
                      for codes in separate_codes
                  ]
          return (separate_points, separate_offsets)
      elif fill_type_to == FillType.ChunkCombinedCode:
          ret1: cpy.FillReturn_ChunkCombinedCode = (
              filled[0],
              filled[1],
          )
          return ret1
      elif fill_type_to == FillType.ChunkCombinedOffset:
          all_offsets = [
              None if codes is None else arr.offsets_from_codes(codes)
              for codes in filled[1]
          ]
          ret2: cpy.FillReturn_ChunkCombinedOffset = (
              filled[0],
              all_offsets,
          )
          return ret2
      elif fill_type_to == FillType.ChunkCombinedCodeOffset:
          return filled
      elif fill_type_to == FillType.ChunkCombinedOffsetOffset:
          chunk_offsets: list[cpy.OffsetArray | None] = []
          chunk_outer_offsets: list[cpy.OffsetArray | None] = []
          for codes, outer_offsets in zip(*filled[1:]):
              if codes is None:
                  chunk_offsets.append(None)
                  chunk_outer_offsets.append(None)
              else:
                  if TYPE_CHECKING:
                      assert outer_offsets is not None
                  offsets = arr.offsets_from_codes(codes)
                  outer_offsets = np.array(
                      [
                          np.nonzero(offsets == oo)[0][0]
                          for oo in outer_offsets
                      ],
                      dtype=offset_dtype,
                  )
                  chunk_offsets.append(offsets)
                  chunk_outer_offsets.append(outer_offsets)
          ret3: cpy.FillReturn_ChunkCombinedOffsetOffset = (
              filled[0],
              chunk_offsets,
              chunk_outer_offsets,
          )
          return ret3
      else:
          raise ValueError(f"Invalid FillType {fill_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 5 for calling a global function with example usage: _convert_filled_from_ChunkCombinedCodeOffset(filled, fill_type_to) and returns: separate_points,  separate_codes, separate_points,  separate_offsets, ret1, ret2, filled, ret3