         for p in params:              if len(params[p]) > 0:                 raise Exception("multiple occurrence of extension parameter '%s' for extension '%s'" % (p, cls.EXTENSION_NAME))              val = params[p][0]              if p == 'client_no_context_takeover':                 # noinspection PySimplifyBooleanCheck                 if val is not True:                     raise Exception("illegal extension parameter value '%s' for parameter '%s' of extension '%s'" % (val, p, cls.EXTENSION_NAME))                 else:                     