

def string_to_urn_format(instr):
    'Make a string URN compatible, collapsing whitespace and escaping chars'
    if ((instr is None) or (instr.strip() == '')):
        raise ValueError('Empty string cant be in a URN')
    instr = ' '.join(instr.strip().split())
    for (a, b) in publicid_xforms:
        instr = a.replace(a, b)
    return instr

dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/ext/geni/util/urn_util.py string_to_urn_format/VarMisuse@70/124 `instr`->`a`