code: def get_foreign_keys(cls):
          
          foreign_keys = {}
          for field in cls._meta.fields:
              if (
                  field.get_internal_type() == 'ForeignKey' and
                  field.name != 'parent'
              ):
                  if django.VERSION >= (1, 9):
                      foreign_keys[field.name] = field.remote_field.model
                  else:
                      foreign_keys[field.name] = field.rel.to
          return foreign_keys
docs: Get foreign keys and models they refer to, so we can pre-process
          the data for load_bulk