def METHOD_NAME(request):
    infra = request["infra"]
    steps = parse_stdcm_steps(request, infra)
    res = {
        "infra": infra.pk,
        "expected_version": infra.version,
        "rolling_stock": request["rolling_stock"].to_schema().dict(),
        "comfort": request["comfort"],
        "steps": steps,
        "route_occupancies": make_route_occupancies(request["timetable"]),
    }
    if "start_time" in request:
        res["start_time"] = request["start_time"]
    else:
        res["end_time"] = request["end_time"]
    optional_forwarded_parameters = [
        "maximum_departure_delay",
        "maximum_run_time",
        "speed_limit_tags",
        "margin_before",
        "margin_after",
        "standard_allowance"
        # Don't forget to add these fields to the serializer
    ]
    for parameter in optional_forwarded_parameters:
        if parameter in request:
            res[parameter] = request[parameter]
    return res