def METHOD_NAME(pipette: Pipette, volume: float) -> float:
    distance = volume / pipette.ul_per_mm(volume, "dispense")
    if "gen3" in pipette.name:
        if pipette.working_volume == 1000:
            diameter = 4.5
        elif pipette.working_volume == 50:
            diameter = 1.0
        else:
            raise ValueError(f"Unexpected pipette: {pipette.model}")
    elif "gen2" in pipette.name:
        if pipette.working_volume == 1000:
            diameter = 6.0
        elif pipette.working_volume == 300:
            diameter = 3.5
        elif pipette.working_volume == 20:
            diameter = 1.0
        else:
            raise ValueError(f"Unexpected pipette: {pipette.model}")
    else:
        raise ValueError(f"Unexpected pipette: {pipette.model}")
    cross_section_area = PI * ((diameter / 2) ** 2)
    return cross_section_area * distance