def address_from_address_family(address_family, single_address):
 name = single_address.name
 if (name is None):
  name = basename(single_address.directory)
 if (name not in address_family.objects_by_name):
  _raise_did_you_mean(address_family, single_address.name)
 return Addresses(tuple([Address(address_family.namespace, name)]))

def address_from_address_family ( address_family , single_address ) : name = single_address . name if ( name is None ) : name = basename ( single_address . directory ) if ( name not in address_family . objects_by_name ) : _raise_did_you_mean ( address_family , single_address . name ) return Addresses ( tuple ( [ Address ( address_family . namespace , name ) ] ) )
given an addressfamily and a singleaddress .