<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def gather_candidates(self):
 """ Gather local candidates. You **must** call this coroutine before calling :meth:`connect`. """

        if not self._local_candidates_start:
            self._local_candidates_start = True
            addresses = get_host_addresses(use_ipv4=self._use_ipv4, use_ipv6=self._use_ipv6)
            for component in self._components:
                self._local_candidates += await self.get_component_candidates(
                    component=component,
                    addresses=addresses)
            self._local_candidates_end = True