<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read(filelines, mapping=None, wok=False):
 """Parse a ris lines and return a list of entries. Entries are codified as dictionaries whose keys are the different tags. For single line and singly occurring tags, the content is codified as a string. In the case of multiline or multiple key occurrences, the content is returned as a list of strings. Keyword arguments: bibliography_file -- ris filehandle mapping -- custom RIS tags mapping wok -- flag, Web of Knowledge format is used if True, otherwise Refman's RIS specifications are used. """


    if wok:
        if not mapping:
            mapping = WOK_TAG_KEY_MAPPING
        return Wok(filelines, mapping).parse()
    else:
        if not mapping:
            mapping = TAG_KEY_MAPPING
        return Ris(filelines, mapping).parse()