def _annotation_writer(gff_row):
    """
    Establish a set of rules to annotate Uniprot GFF.

    :param pd.Series gff_row: each line in the GFF file.
    :return str: template filled with type-specific fields.
    """
    if not gff_row.ID and not gff_row.Note:
        return gff_row.TYPE
    elif not gff_row.ID:
        return '{0.TYPE}: {0.Note}'.format(gff_row)
    elif not gff_row.Note:
        return '{0.TYPE} ({0.ID})'.format(gff_row)
    else:
        return '{0.TYPE}: {0.Note} ({0.ID})'.format(gff_row)
