def METHOD_NAME(event, user):
    reg = Registration.objects.get_or_create(event=event, user=user)[0]
    pr = cProfile.Profile()
    pr.enable()
    reg.event.register(reg)
    pr.disable()
    pr.dump_stats(f"single{event.id}.pstat")