def METHOD_NAME(
    fcan_clock: Optional[int],
    bitrate: Optional[int],
    sample_rate: Optional[float],
    jump_width: Optional[int],
) -> PCANParameters:
    """Calculate FDCAN Timing Parameters.
    Args:
        fcan_clock: The clock used by the analyzer
        bitrate: The bitrate of data transfer
        sample_rate: When to sample the data.
        jump_width: The max time the sampling period can be lengthened or shortened
    """
    if not fcan_clock:
        fcan_clock = DEFAULT_FDCAN_CLK
    if not bitrate:
        bitrate = DEFAULT_BITRATE
    if not sample_rate:
        sample_rate = DEFAULT_SAMPLE_RATE
    if not jump_width:
        jump_width = DEFAULT_JUMP_WIDTH_SEG
    if fcan_clock > MAX_FCAN_CLK:
        raise CANBusConfigurationError(
            message=f"Clock value {fcan_clock} exceeds max value of {MAX_FCAN_CLK}",
            detail={"clock": str(fcan_clock), "max": str(MAX_FCAN_CLK)},
        )
    if jump_width > MAX_SJW:
        raise CANBusConfigurationError(
            message=f"Jump width value {jump_width} exceeds max value of {MAX_SJW}",
            detail={"sjw": str(jump_width), "max": str(MAX_SJW)},
        )
    sample_rate_percent = sample_rate / 100
    bit_time_us = (1 / bitrate) * SECOND_TO_MICROSECOND
    time_quantum_us = 1 / fcan_clock
    time_quanta_count = (bit_time_us * US_TO_NS) // TIME_QUANTUM_DURATION_NS
    # Given a sample rate, we can say that
    # (sync_quantum + TSEG1)/(sync_quantum + TSEG1 + TSEG2) = sample_rate
    # and also that (sync_quantum + TSEG1 + TSEG2) = time_quanta_count (tq)
    tseg_1 = (sample_rate_percent * time_quanta_count) - SYNC_QUANTUM
    tseg_2 = time_quanta_count - SYNC_QUANTUM - tseg_1
    brp = TIME_QUANTUM_DURATION_NS / (
        time_quantum_us * US_TO_NS
    )  # clock prescaler (unitless)
    _check_calculated_bit_timing_values(brp, tseg_1, tseg_2)
    return PCANParameters(
        f_clock_mhz=fcan_clock,
        nom_brp=int(brp),
        nom_tseg1=floor(tseg_1),
        nom_tseg2=floor(tseg_2),
        nom_sjw=jump_width,
    )