<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_tcntobj(go2obj, **kws):
 """Return a TermCounts object if the user provides an annotation file, otherwise None."""

    # kws: gaf gene2go
    annots = read_annotations(**kws)
    if annots:
        return TermCounts(go2obj, annots)