Function to derive address family from a junos table name.

        :params table: The name of the routing table
        :returns: address family

def _get_address_family(table, instance):
        """
        Function to derive address family from a junos table name.

        :params table: The name of the routing table
        :returns: address family
        """
        address_family_mapping = {"inet": "ipv4", "inet6": "ipv6", "inetflow": "flow"}
        if instance == "master":
            family = table.rsplit(".", 1)[-2]
        else:
            family = table.split(".")[-2]
        try:
            address_family = address_family_mapping[family]
        except KeyError:
            address_family = None
        return address_family