code: def find_first_nonempty(attr, parents=None):
      if parents is None:
          parents = []
  
      if attr is None or ia.is_np_array(attr):
          return attr, True, parents
      # we exclude strings here, as otherwise we would get the first
      # character, while we want to get the whole string
      if _is_iterable(attr):
          if len(attr) == 0:
              return None, False, parents
  
          # this prevents the loop below from becoming infinite if the
          # element in the iterable is identical with the iterable,
          # as is the case for e.g. strings
          if attr[0] is attr:
              return attr, True, parents
  
          # Usually in case of empty lists, all lists should have similar
          # depth. We are a bit more tolerant here and pick the deepest one.
          # Only parents would really need to be tracked here, we could
          # ignore nonempty and success as they will always have the same
          # values (if only empty lists exist).
          nonempty_deepest = None
          success_deepest = False
          parents_deepest = parents
          for attr_i in attr:
              nonempty, success, parents_found = find_first_nonempty(
                  attr_i, parents=parents + [attr]
              )
              if success:
                  # on any nonempty hit we return immediately as we assume
                  # that the datatypes do not change between child branches
                  return nonempty, success, parents_found
              if len(parents_found) > len(parents_deepest):
                  nonempty_deepest = nonempty
                  success_deepest = success
                  parents_deepest = parents_found
  
          return nonempty_deepest, success_deepest, parents_deepest
  
      return attr, True, parents
  
imports: from __future__ import print_function, division, absolute_import
  import functools
  import numpy
  from ..None import imgaug
  from ..None import dtypes
  from .base import IAugmentable
label_desc: Use image node_id 34 for calling a global function with example usage: find_first_nonempty(attr, parents) and returns: attr,  True,  parents, attr,  True,  parents, nonempty_deepest,  success_deepest,  parents_deepest, None,  False,  parents, attr,  True,  parents, nonempty,  success,  parents_found