<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_document(fnm):
 """Read a document that is stored in a text file as JSON. Parameters fnm: str The path of the document. Returns ------- Text """

    with codecs.open(fnm, 'rb', 'ascii') as f:
        return Text(json.loads(f.read()))