code: def apply_fn_to_list(item, fun):
      if isinstance(item, list):
          return [apply_fn_to_list(x, fun) for x in item]
      else:
          return fun(item)
  
imports: import copy
  import warnings
  import pytest
  import numpy
  import ivy
label_desc: Use image node_id 4 for calling a global function with example usage: apply_fn_to_list(item, fun) and returns: unknown, fun