

def get_authority(xrn):
    (hrn, type) = urn_to_hrn(xrn)
    if (type and (type == 'authority')):
        return hrn
    parts = hrn.split('.')
    return '.'.join(parts[:(- 1)])

dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/sfa/util/namespace.py get_authority/original