code: def dict_from_qs(qs):
      ''' Slightly introverted parser for lists of dot-notation nested fields
          i.e. "period.di,period.fhr" => {"period": {"di": {}, "fhr": {}}}
      '''
      entries = qs.split(',') if qs.strip() else []
      entries = [entry.strip() for entry in entries]
  
      def _dict_from_qs(line, d):
          if '.' in line:
              key, value = line.split('.', 1)
              d.setdefault(key, {})
              return _dict_from_qs(value, d[key])
          else:
              d[line] = {}
  
      def _default():
          return defaultdict(_default)
  
      d = defaultdict(_default)
      for line in entries:
          _dict_from_qs(line, d)
      return f dict_from_qs(qs):
      ''' Slightly introverted parser for lists of dot-notation nested fields
          i.e. "period.di,period.fhr" => {"period": {"di": {}, "fhr": {}}}
      '''
      entries = qs.split(',') if qs.strip() else []
      entries = [entry.strip() for entry in entries]
  
      def _dict_from_qs(line, d):
          if '.' in line:
              key, value = line.split('.', 1)
              d.setdefault(key, {})
              return _dict_from_qs(value, d[key])
          else:
              d[line] = {}
  
      def _default():
          return defaultdict(_default)
  
      d = defaultdict(_default)
      for line in entries:
          _dict_from_qs(line, d)
      return d
docs: Slightly introverted parser for lists of dot-notation nested fields
          i.e. "period.di,period.fhr" => {"period": {"di": {}, "fhr": {}}}