code: def is_array(x) -> bool:
      """Check if x is either a list or np.ndarray."""
      return isinstance(x, (list, np.ndarray))
  
imports: import os
  from datetime import timedelta
  from typing import Union
  import numpy
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: is_array(x) and returns: isinstance