<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def client(self):
 """Get an elasticsearch client """

        if not hasattr(self, "_client"):
            self._client = connections.get_connection("default")
        return self._client