code: def _infer_tile_ids_from_nested_list(entry, current_pos):
      
  
      if isinstance(entry, list):
          for i, item in enumerate(entry):
              for result in _infer_tile_ids_from_nested_list(item,
                                                             current_pos + (i,)):
                  yield result
      else:
          yield current_pos, entry
docs: Given a list of lists (of lists...) of objects, returns a iterator
      which returns a tuple containing the index of each object in the nested
      list structure as the key, and the object. This can then be called by the
      dict constructor to create a dictionary of the objects organised by their
      position in the original nested list.
  
      Recursively traverses the given structure, while keeping track of the
      current position. Should work for any type of object which isn't a list.
  
      Parameters
      ----------
      entry : list[list[obj, obj, ...]]
          List of lists of arbitrary depth, containing objects in the order
          they are to be concatenated.
  
      Returns
      -------
      combined_tile_ids : dict[tuple(int, ...), obj]