imm_params(imm) yields a dictionary of the parameters of the immutable object imm.

def imm_params(imm):
    '''
    imm_params(imm) yields a dictionary of the parameters of the immutable object imm.
    '''
    return {p: getattr(imm, p) for p in six.iterkeys(_imm_param_data(imm))}