code: def BuildLegacySubject(subject_id, approval_type):
    
    at = rdf_objects.ApprovalRequest.ApprovalType
  
    if approval_type == at.APPROVAL_TYPE_CLIENT:
      return "aff4:/%s" % subject_id
    elif approval_type == at.APPROVAL_TYPE_HUNT:
      return "aff4:/hunts/%s" % subject_id
    elif approval_type == at.APPROVAL_TYPE_CRON_JOB:
      return "aff4:/cron/%s" % subject_id
  
    raise ValueError("Invalid approval type.")
docs: Builds a legacy AFF4 urn string for a given subject and approval type.