def _resolve_nat_element(element_or_ip_address):
    """
    NAT elements can be referenced by either IP address or as type
    Element. Resolve that to the right dict structure for the rule
    
    :param str,Element element_or_ip_address: Element or IP string
    :rtype: dict
    """
    try:
        src = {'element': element_or_ip_address.href}
    except AttributeError:
        src = {'ip_descriptor': element_or_ip_address}

    return src