docs: def count_levels(value):
      """
          Count how many levels are in a dict:
          scalar, list etc = 0
          {} = 0
          {'a':1} = 1
          {'a' : {'b' : 1}} = 2
          etc...
      """
      if not isinstance(value, dict) or len(value) == 0:
          return 0
      elif len(value) == 0:
          return 0 #An emptu dict has 0
      else:
          nextval = list(value.values())[0]
          return 1 + count_levels(nextval)