code: def to_list(x: Any) -> List:
      """Convert the input to a list if necessary.
  
      Parameters
      ----------
      x : Any
          The input that needs to be converted into a list.
  
      Returns
      -------
      List
          A list of `x` if `x` wasn't a list yet, otherwise `x`.
  
      """
      if not isinstance(x, (list, np.ndarray)):
          return [x]
      return list(x)
  
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 3 for calling a global function with example usage: to_list(x) and returns: list, list