def close(self, code=<NUM_LIT>, reason="<STR_LIT>"):
if self.state in (STATE_CLOSING, STATE_CLOSED):<EOL><INDENT>return<EOL><DEDENT>if self._debug:<EOL><INDENT>log.debug("<STR_LIT>", self.id)<EOL><DEDENT>self.state = STATE_CLOSING<EOL>self._feed(FRAME_CLOSE, (code, reason))<EOL>
close session