<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 service client and its plugins. """

        self._execute_plugin_hooks_sync(hook='close')

        if not self.session.closed:
            ensure_future(self.session.close(), loop=self.loop)