<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def address_target_pairs_from_address_families(self, address_families):
 """Return the pair for the single target matching the single AddressFamily, or error. :raises: :class:`SingleAddress._SingleAddressResolutionError` if no targets could be found for a :class:`SingleAddress` instance. :return: list of (Address, Target) pairs with exactly one element. """

    single_af = assert_single_element(address_families)
    addr_tgt_pairs = [
      (addr, tgt) for addr, tgt in single_af.addressables.items()
      if addr.target_name == self.name
    ]
    if len(addr_tgt_pairs) == 0:
      raise self._SingleAddressResolutionError(single_af, self.name)
    # There will be at most one target with a given name in a single AddressFamily.
    assert(len(addr_tgt_pairs) == 1)
    return addr_tgt_pairs