<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_targets_by_instance(self, instance_id, target_list=None):
 """Returns a list of FloatingIpTarget objects of FIP association. :param instance_id: ID of target VM instance :param target_list: (optional) a list returned by list_targets(). If specified, looking up is done against the specified list to save extra API calls to a back-end. Otherwise target list is retrieved from a back-end inside the method. """

        if target_list is not None:
            # We assume that target_list was returned by list_targets()
            # so we can assume checks for subnet reachability and IP version
            # have been done already. We skip all checks here.
            return [target for target in target_list
                    if target['instance_id'] == instance_id]
        else:
            ports = self._target_ports_by_instance(instance_id)
            reachable_subnets = self._get_reachable_subnets(
                ports, fetch_router_ports=True)
            name = self._get_server_name(instance_id)
            targets = []
            for p in ports:
                for ip in p.fixed_ips:
                    if ip['subnet_id'] not in reachable_subnets:
                        continue
                    # Floating IPs can only target IPv4 addresses.
                    if netaddr.IPAddress(ip['ip_address']).version != 4:
                        continue
                    targets.append(FloatingIpTarget(p, ip['ip_address'], name))
            return targets