code: def related_to(self, instance):
          
          return self.filter(table_name=instance.table_name, record_id=instance.record_id)
docs: Filter for all log objects of the same connected model as the given instance.