code: def _GetDenseDimensions(list_of_lists):
      
      if not isinstance(list_of_lists, (list, tuple)):
          return []
      elif not list_of_lists:
          return [0]
      else:
          return [len(list_of_lists)] + _GetDenseDimensions(list_of_lists[0])
docs: Returns the inferred dense dimensions of a list of lists.