code: def to_list(x, recursive=False):
      """Convert an object to list.
  
      If Sequence (e.g. list, tuple, Listconfig): just return it
  
      Special case: If non-recursive and not a list, wrap in list
      """
      if is_list(x):
          if recursive:
              return [to_list(_x) for _x in x]
          else:
              return list(x)
      else:
          if recursive:
              return x
          else:
              return [x]
  
file_path: espnet/espnet2/asr/state_spaces/utils.py
imports: import functools
  from typing import Callable, Mapping, Sequence
  import hydra
  from omegaconf import DictConfig, ListConfig
label_desc: Use image node_id 4 for calling a global function with example usage: to_list(x, recursive) and returns: unknown, list, x, list