import re


def split_hname(hname):
    """split a hierarchical name (hname) into parts.

    double '/' is used to escape the '/'.
    and is transformed into a into single '/'

    e.g.
        hname = "network/network-fd02:://64"
        => ["network", "network-fd02::/64"]

    :param str hname: hierarchical name
    :returns: a list with the splitted parts of the hname
    :rtype: list
    """
    lst = []
    cat = None
    for part in re.split(r"/(?=[^/])", hname):
        if cat:
            part = cat + part
            cat = None
        if part[-1] == '/':
            cat = part
        else:
            lst.append(part)
    return lst