def rspec_to_omnispec(urn, rspec):

    trans_mod = __import__(mod_name,fromlist=[mod_name])
    translators = trans_mod.all
    
    mod = None
    for translator in translators:
        mod = __import__(mod_name + '.' + translator, fromlist=[mod_name])
        if mod.can_translate(rspec):
            break
        else:
            mod = None
    
    if mod:
        return mod.rspec_to_omnispec(urn, rspec)
    
    raise Exception('Unknown RSpec Type from AM %s. Cant translate RSpec:\n%s' % (urn, rspec))
Translate the given RSpec from the given AM URN to an OSpec and
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/omnilib/omnispec/translation.py/rspec_to_omnispec