def contribute_to_related_class(self, cls, related):
        super(ParentalKey, self).contribute_to_related_class(cls, related)

        # store this as a child field in meta. NB child_relations only contains relations
        # defined to this specific model, not its superclasses
        try:
            cls._meta.child_relations.append(related)
        except __HOLE__:
            cls._meta.child_relations = [related]
dataset/ETHPy150Open torchbox/django-modelcluster/modelcluster/fields.py/ParentalKey.contribute_to_related_class