<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 get_instances(self, **kwargs) -> List[ApiResource]: """Returns a list of resource instances. :raises PvApiError when a hub problem occurs."""

        raw_resources = await self.get_resources(**kwargs)
        _instances = [
            self._resource_factory(_raw)
            for _raw in self._loop_raw(raw_resources)
        ]
        return _instances