docs: def _create_related(self, obj, related, subfield_dict):
          """
          create DB objects related to a base object
              obj:            a base object to create related
              related:        dict mapping field names to lists of related objects
              subfield_list:  where to get the next layer of subfields
          """
          for field, items in related.items():
              subobjects = []
              all_subrelated = []
              Subtype, reverse_id_field, subsubdict = subfield_dict[field]
              for order, item in enumerate(items):
                  # pull off 'subrelated' (things that are related to this obj)
                  subrelated = {}
                  for subfield in subsubdict:
                      subrelated[subfield] = item.pop(subfield)
  
                  if field in self.preserve_order:
                      item['order'] = order
  
                  item[reverse_id_field] = obj.id
  
                  try:
                      subobjects.append(Subtype(**item))
                      all_subrelated.append(subrelated)
                  except Exception as e:
                      raise DataImportError('{} while importing {} as {}'.format(e, item, Subtype))
  
              # add all subobjects at once (really great for actions & votes)
              try:
                  Subtype.objects.bulk_create(subobjects)
              except Exception as e:
                  raise DataImportError('{} while importing {} as {}'.format(e, subobjects, Subtype))
  
              # after import the subobjects, import their subsubobjects
              for subobj, subrel in zip(subobjects, all_subrelated):
                  self._create_related(subobj, subrel, subsubdict)