def resolve_id(resolver, identifier, name='object'):
    ids = resolver(identifier)

    if len(ids) == 0:
        raise exceptions.CLIAbort("Error: Unable to find %s '%s'"
                                  % (name, identifier))

    if len(ids) > 1:
        raise exceptions.CLIAbort(
            "Error: Multiple %s found for '%s': %s" %
            (name, identifier, ', '.join([str(_id) for _id in ids])))

    return ids[0]
Test that the reference object's representation works
dataset/ETHPy150Open softlayer/softlayer-python/SoftLayer/CLI/helpers.py/resolve_id--crossover with--dataset/ETHPy150Open ARM-software/workload-automation/wlauto/external/louie/test/test_saferef.py/TestSaferef.test_Representation