def METHOD_NAME(date_of_birth_range, age_thresholds):
    """
    Retrieves patients with date of birth (rounded to start of month) plus the
    practice pseudo IDs to which they were registered in the months where they
    hit the defined age thresholds (measured in months).
    Where no corresponding registration was found 0 is returned
    """
    practice_id_columms = ",".join(map(sql_for_practice_id_at_age, age_thresholds))
    return f"""
    SELECT
      Patient.Patient_ID AS patient_id,
      {truncate_to_first_of_month("DateOfBirth")} AS date_of_birth,
      {practice_id_columms}
    FROM
      Patient
    WHERE
      DateOfBirth {in_range(date_of_birth_range)}
    ORDER BY patient_id
    """