def METHOD_NAME(*, talk, room, event):
    date = talk.find("date").text
    start = parse(date + " " + talk.find("start").text)
    hours, minutes = talk.find("duration").text.split(":")
    duration = dt.timedelta(hours=int(hours), minutes=int(minutes))
    duration_in_minutes = duration.total_seconds() / 60
    try:
        end = parse(date + " " + talk.find("end").text)
    except AttributeError:
        end = start + duration
    sub_type = SubmissionType.objects.filter(
        event=event, name=talk.find("type").text, default_duration=duration_in_minutes
    ).first()
    if not sub_type:
        sub_type = SubmissionType.objects.create(
            name=talk.find("type").text or "default",
            event=event,
            default_duration=duration_in_minutes,
        )
    track = Track.objects.filter(event=event, name=talk.find("track").text).first()
    if not track:
        track = Track.objects.create(
            name=talk.find("track").text or "default", event=event
        )
    optout = False
    with suppress(AttributeError):
        optout = talk.find("recording").find("optout").text == "true"
    code = None
    for potential_code in (
        talk.attrib["id"],
        talk.attrib["guid"][:16],
    ):  # pragma: no cover
        if (
            Submission.objects.filter(code__iexact=potential_code, event=event).exists()
            or not Submission.objects.filter(code__iexact=potential_code).exists()
        ):
            code = potential_code
            break
    sub, _ = Submission.objects.get_or_create(
        event=event, code=code, defaults={"submission_type": sub_type}
    )
    sub.submission_type = sub_type
    sub.track = track
    sub.title = talk.find("title").text
    sub.description = talk.find("description").text
    if talk.find("subtitle").text:
        sub.description = talk.find("subtitle").text + "\n" + (sub.description or "")
    sub.abstract = talk.find("abstract").text
    sub.content_locale = talk.find("language").text or event.locale
    sub.do_not_record = optout
    sub.state = SubmissionStates.CONFIRMED
    sub.save()
    for person in talk.find("persons").findall("person"):
        user = User.objects.filter(name=person.text[:60]).first()
        if not user:
            user = User(name=person.text, email=f"{person.text}@localhost")
            user.save()
            SpeakerProfile.objects.create(user=user, event=event)
        sub.speakers.add(user)
    slot, _ = TalkSlot.objects.get_or_create(
        submission=sub, schedule=event.wip_schedule, is_visible=True
    )
    slot.room = room
    slot.is_visible = True
    slot.start = start
    slot.end = end
    slot.save()