code: def _convert_flat_to_nest(self, params):
          
          result = {}
          for k, v in params.iteritems():
              last = result
              segments = k.split('.')
              for index, item in enumerate(segments):
                  if index == len(segments) - 1:
                      newd = v
                  else:
                      newd = {}
                  if not isinstance(last, dict):
                      raise InconsistentParameterError(k)
                  if type(last.get(item)) is dict and type(newd) is not dict:
                      raise InconsistentParameterError(k)
                  last = last.setdefault(item, newd)
          return result
docs: Convert a structure in the form of::
  
              {'foo.1.bar': 'value',
               'foo.2.baz': 'value'}
  
          to::
  
              {'foo': {'1': {'bar': 'value'},
                       '2': {'baz': 'value'}}}
  
          This is intended for use both during parsing of HTTP arguments like
          'foo.1.bar=value' and when dealing with schema declarations that look
          like 'foo.n.bar'.
  
          This is the inverse of L{_convert_nest_to_flat}.