code: def check_iterable_depth(obj, max_depth=100):
      
      def find_iterables(obj):
          iterables = []
          for item in obj:
              if isiterable(item):
                  iterables += list(item)
          return iterables
  
      depth = 0
      while (depth < max_depth) and isiterable(obj) and len(obj) > 0:
          depth += 1
          obj = find_iterables(obj)
      return depth
docs: find the maximum depth of nesting of the iterable
  
      Parameters
      ----------
      obj : iterable
      max_depth : int, default: 100
          maximum depth beyond which we stop counting
  
      Returns
      -------
      int