code: def unlistify(x: List[Any]) -> Union[List[Any], Any]:
      if not isinstance(x, list):
          raise ValueError("x must be a list.")
      if len(x) == 1:
          return x[0]
      return x
  
file_path: baikal/baikal/_core/utils.py
imports: from typing import Union, Any, List, Tuple
label_desc: Use image node_id 2 for calling a global function with example usage: unlistify(x) and returns: x, x