@classmethod
    def get_master_instance(self, ar, model, pk):
        if issubclass(model, models.Model):
            try:
                return model.objects.get(pk=pk)
            except ValueError:
                return None
            except model.DoesNotExist:
                return None
        msg = "{0} must override get_master_instance"
        msg = msg.format(self)
        raise Exception(msg)
        # from lino.core import choicelists
        # if issubclass(master, choicelists.Choice):
        #     if master.choicelist is None:
        #         kw['master_instance'] = None
        #     else:
        #         mi = master.choicelist.get_by_values(pk)
        #         kw['master_instance'] = mi
        # else:
        #     logger.info("Invalid master %s", master)
Return the `master_instance` corresponding to the specified primary
dataset/ETHPy150Open lsaffre/lino/lino/core/actors.py/Actor.get_master_instance