def METHOD_NAME(pkg, d):
    if d.startswith("!"):
        d = d[1:]
    bkt = d.rfind(">")
    bsl = d.rfind("/")
    if bkt < 0 and bsl < 0:
        pkg.error(f"source '{d}' has an invalid format")
    if bkt > bsl:
        return d[0:bkt], d[bkt + 1 :]
    else:
        return d, d[bsl + 1 :]