'(typ, [data]) = <instance>.id(kv_pairs)
\'kv_pairs\' is a possibly empty list of keys and values.
\'data\' is a list of ID key value pairs or NIL.
NB: a single argument is assumed to be correctly formatted and is passed through unchanged
(for backward compatibility with earlier version).
Exchange information for problem analysis and determination.
The ID extension is defined in RFC 2971.'

def id(self, *kv_pairs, **kw):

    name = 'ID'
    kw['untagged_response'] = name
    if (not kv_pairs):
        data = 'NIL'
    elif (len(kv_pairs) == 1):
        data = kv_pairs[0]
    else:
        data = ('(%s)' % '    '.join([((arg and self._quote(arg)) or 'NIL') for arg in kv_pairs]))
    return self._simple_command(name, data, **kw)
