code: def flip_lines(
      matrix: Iterable[Tuple[int, int]], base: int
  ) -> Tuple[int, int]:
      """
      Given a matrix in a linear array, flip the element order of every odd row
      """
      for line_number, line in enumerate(chunked(matrix, base)):
          yield from line if line_number % 2 == 0 else line[::-1]
  
imports: import copy
  import math
  from itertools import islice, product
  from typing import Dict, Iterable, Iterator, List, Optional, Tuple, Union
  import warnings
  import matplotlib.font_manager
  from matplotlib.axes import Axes
  from matplotlib.figure import Figure
  from matplotlib.patches import Patch, Rectangle
  from matplotlib.pyplot import cm
label_desc: Use image node_id 5 for calling a global function with example usage: flip_lines(matrix, base) without return types