code: def post2pydict(post, ignore_list):
      root_element = PYUNTL_DISPATCH['metadata']()
      untl_form_dict = {}
      form_post = dict(post.copy())
      for key, value_list in form_post.items():
          if key not in ignore_list:
              (element_tag, element_attribute) = key.split('-', 1)
              if element_tag not in untl_form_dict:
                  untl_form_dict[element_tag] = ()
              untl_form_dict[element_tag] += (element_attribute, value_list),
      for element_tag, attribute_tuple in untl_form_dict.items():
          attribute_count = len(attribute_tuple)
          value_count = len(attribute_tuple[0][1])
          for i in range(0, attribute_count):
              if not len(attribute_tuple[i][1]) == value_count:
                  raise PyuntlException('Field values did not match up '
                                        'numerically for %s' % (element_tag))
          for i in range(0, value_count):
              untl_element = None
              content = ''
              qualifier = ''
              child_list = []
              for j in range(0, attribute_count):
                  if attribute_tuple[j][0] == 'content':
                      content = unicode(attribute_tuple[j][1][i])
                  elif attribute_tuple[j][0] == 'qualifier':
                      qualifier = attribute_tuple[j][1][i]
                  else:
                      if attribute_tuple[j][1][i] != '':
                          child_tag = attribute_tuple[j][0]
                          if child_tag in PARENT_FORM:
                              qualifier = attribute_tuple[j][1][i]
                          else:
                              child_list.append(
                                  PYUNTL_DISPATCH[attribute_tuple[j][0]](
                                      content=attribute_tuple[j][1][i]
                                  )
                              )
              if content != '' and qualifier != '':
                  untl_element = PYUNTL_DISPATCH[element_tag](content=content,
                                                              qualifier=qualifier)
              elif content != '':
                  untl_element = PYUNTL_DISPATCH[element_tag](content=content)
              elif qualifier != '':
                  untl_element = PYUNTL_DISPATCH[element_tag](qualifier=qualifier)
              elif len(child_list) > 0:
                  untl_element = PYUNTL_DISPATCH[element_tag]()
              if len(child_list) > 0 and untl_element is not None:
                  for child in child_list:
                      untl_element.add_child(child)
              if untl_element is not None:
                  root_element.add_child(untl_element)
      return root_element.create_element_dict()