def get_substs(iomode, vcc, extracfg=None):
    if (iomode == 'NONE'):
        (iodir, type) = ('NONE', '')
    else:
        (iodir, type) = iomode.split('_', 1)
    substs = {'dir': iodir, 'io_type': type, 'loc': pin, 'extra_attrs': '', 'vcc': vcc}
    if (extracfg is not None):
        substs['extra_attrs'] = '(* {}="{}" *)'.format(extracfg[0], extracfg[1])
    return substs
def get_substs(iomode, vcc, extracfg=None):
    if (iomode == 'NONE'):
        (iodir, type) = ('NONE', )
    else:
        (iodir, type) = iomode.split('_', 1)
    substs = {'dir': iodir, 'io_type': type, 'loc': pin, 'extra_attrs': , 'vcc': vcc}
    if (extracfg is not None):
        substs['extra_attrs'] = '(* {}="{}" *)'.format(extracfg[0], extracfg[1])
    return substs