def compute_scaling_factor(distance: float) -> float:
    """
    The scaling factor concept idea is from the following paper:
    "Baumgartner, T., Lin, C., Liu, Y., Mendonsa, A., & Zimpfer, D. (2019, March).
    Using Big Data to Study the Impact of Wellbore Tortuosity on Drilling, Completions,
    and Production Performance. In SPE/IADC International Drilling Conference and Exhibition.
    Society of Petroleum Engineers."

    :param distance: , [ft]
    :return:
    """
    if distance < 30:
        return 0.3 / (0.3 + 0.025 * (30 - distance))

    if distance > 30:
        return 0.3 / (0.3 - (0.05 / 30) * (distance - 30))

    return 1