code: def safe_int_cast(obj):
      if isinstance(obj, np.ndarray):
          return obj.astype("int")
      if isinstance(obj, list):
          return [int(i) for i in obj]
      return int(obj)
  
imports: import numpy
  import numpy.random
  import scipy.stats
  from scipy.stats import rv_continuous
  from scipy.stats._continuous_distns import lognorm_gen
label_desc: Use image node_id 3 for calling a global function with example usage: safe_int_cast(obj) and returns: int, obj, unknown