def group_source_address(grp, address_family):
    """Return the correct source address from a group matching the desired address-family.

    Keyword arguments:
    grp -- the group configuration
    address_family -- desired address-family
    """
    attribute = "src_{}".format(address_family.lower())
    return getattr(grp, attribute)