def close(self):
readfile = getattr(self, "<STR_LIT>", None)<EOL>if readfile is not None:<EOL><INDENT>readfile.close()<EOL><DEDENT>writefile = getattr(self, "<STR_LIT>", None)<EOL>if writefile is not None:<EOL><INDENT>writefile.close()<EOL><DEDENT>
When a client closes a file, this method is called on the handle.
Normally you would use this method to close the underlying OS level
file object(s).

The default implementation checks for attributes on ``self`` named
``readfile`` and/or ``writefile``, and if either or both are present,
their ``close()`` methods are called.  This means that if you are
using the default implementations of `read` and `write`, this
method's default implementation should be fine also.