code: def as_list(x):
      """Convert x to a list if it is an iterable; otherwise, wrap it in a list."""
      try:
          return list(x)
      except TypeError:
          return [x]
  
file_path: pytensor/pytensor/tensor/utils.py
imports: import re
  from collections.abc import Sequence
  from typing import Union
  import numpy
  import pytensor
  from pytensor.utils import hash_from_code
label_desc: Use image node_id 3 for calling a global function with example usage: as_list(x) and returns: list, list