<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_sub_shrink(ref, alt_str):
 """Process substution where the string shrink"""

    if len(ref) == 0:
        raise exceptions.InvalidRecordException("Invalid VCF, empty REF")
    elif len(ref) == 1:
        if ref[0] == alt_str[0]:
            return record.Substitution(record.INS, alt_str)
        else:
            return record.Substitution(record.INDEL, alt_str)
    else:
        return record.Substitution(record.INDEL, alt_str)