code: def flatten(data: Iterable) -> Iterator:
      """Flatten the given input data to an iterator.
  
      Parameters
      ----------
      data : Iterable
          The iterable data that needs to be flattened.
  
      Returns
      -------
      Iterator
          An iterator for the flattened data.
  
      """
      return itertools.chain.from_iterable(data)
  
file_path: tsflex/tsflex/utils/data.py
imports: import itertools
  import os
  from pathlib import Path
  from typing import Any, Dict, Iterable, Iterator, List, Tuple, Union
  import numpy
  import pandas
label_desc: Use image node_id 5 for calling a global function with example usage: flatten(data) and returns: itertools