<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filterNonJournals(citesLst, invert = False):
 """Removes the `Citations` from _citesLst_ that are not journals # Parameters _citesLst_ : `list [Citation]` > A list of citations to be filtered _invert_ : `optional [bool]` > Default `False`, if `True` non-journals will be kept instead of journals # Returns `list [Citation]` > A filtered list of Citations from _citesLst_ """


    retCites = []
    for c in citesLst:
        if c.isJournal():
            if not invert:
                retCites.append(c)
        elif invert:
            retCites.append(c)
    return retCites