code: def _convert_lines_from_SeparateCode(
      lines: cpy.LineReturn_SeparateCode,
      line_type_to: LineType,
  ) -> cpy.LineReturn:
      if line_type_to == LineType.Separate:
          # Drop codes.
          return lines[0]
      elif line_type_to == LineType.SeparateCode:
          return lines
      elif line_type_to == LineType.ChunkCombinedCode:
          if not lines[0]:
              ret1: cpy.LineReturn_ChunkCombinedCode = ([None], [None])
          else:
              ret1 = (
                  [arr.concat_points(lines[0])],
                  [arr.concat_codes(lines[1])],
              )
          return ret1
      elif line_type_to == LineType.ChunkCombinedOffset:
          if not lines[0]:
              ret2: cpy.LineReturn_ChunkCombinedOffset = (
                  [None],
                  [None],
              )
          else:
              ret2 = (
                  [arr.concat_points(lines[0])],
                  [arr.offsets_from_lengths(lines[0])],
              )
          return ret2
      elif line_type_to == LineType.ChunkCombinedNan:
          if not lines[0]:
              ret3: cpy.LineReturn_ChunkCombinedNan = ([None],)
          else:
              ret3 = ([arr.concat_points_with_nan(lines[0])],)
          return ret3
      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 9 for calling a global function with example usage: _convert_lines_from_SeparateCode(lines, line_type_to) and returns: lines, lines, ret1, ret2, ret3