def get_payload_struct(context, builder, set_type, ptr):
 payload_type = types.SetPayload(set_type)
 ptrty = context.get_data_type(payload_type).as_pointer()
 payload = builder.bitcast(ptr, ptrty)
 return context.make_data_helper(builder, payload_type, ref=payload)

def get_payload_struct ( context , builder , set_type , ptr ) : payload_type = types . SetPayload ( set_type ) ptrty = context . get_data_type ( payload_type ) . as_pointer ( ) payload = builder . bitcast ( ptr , ptrty ) return context . make_data_helper ( builder , payload_type , ref = payload )
given a set value and type .