<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def close(self):
 """ Close all endpoint file descriptors. """

        ep_list = self._ep_list
        while ep_list:
            ep_list.pop().close()
        self._closed = True