<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def BuildLegacySubject(subject_id, approval_type):
 """Builds a legacy AFF4 urn string for a given subject and 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.")