def to_python(self, val, parent=None):
        if val is None:
            return None
        try:
            if isinstance(val, (tuple, list)):
                if hasattr(self.model.objects, 'get_by_natural_key'):
                    return self.model.objects.get_by_natural_key(*val)
            return self.model.objects.get(pk=val)
        except __HOLE__:
            if self.null:
                return None
            raise
dataset/ETHPy150Open zbyte64/django-dockit/dockit/schema/fields.py/ModelReferenceField.to_python