def build_audit_stub(obj):
  """Returns a stub of audit model to which assessment is related to."""
  audit_id = obj.audit_id
  if audit_id is None:
    return None
  return {
      'type': 'Audit',
      'id': audit_id,
      'context_id': obj.context_id,
      'href': '/api/audits/%d' % audit_id,
      'issue_tracker': obj.audit.issue_tracker,
  }