code: def flatten_list_of_objects_and_iterables(L):
      """Each element of L could be a non-list object or a list of non-objects. This function
      returns a list of non-list objects, where the internal lists have been 'flattened'.
      """
      ret = []
      for elem in L:
          if hasattr(elem, "__iter__") and not isinstance(elem, str):
              ret.extend(elem)
          else:
              ret.append(elem)
      return ret
  
imports: from __future__ import print_function
  from __future__ import division
  import numpy
  from scipy.sparse import dok_matrix
  from scipy.linalg import solve_triangular
label_desc: Use image node_id 25 for calling a global function with example usage: flatten_list_of_objects_and_iterables(L) and returns: ret