def split(attr):
    """ Split <key>=<val> into tuple (<key>,<val>),
        if only string is passed, return ('id', <val>)"""
    if '=' in attr:
        ret = attr.split('=')
        return ret[0], ret[1]
    else:
        return 'id', attr