from typing import List


def beat_duration_at_time(timing_points: List[dict], timestamp: float) -> float:
    """
    Return the beat duration (mls/beat) at the given timestamp
    """
    timestamp_reached = False

    for timing_point in reversed(timing_points):
        offset = float(timing_point['offset'])
        mls_per_beat = float(timing_point['mls_per_beat'])

        if not timestamp_reached:
            timestamp_reached = offset <= timestamp

        if timestamp_reached and mls_per_beat > 0:
            return mls_per_beat

    return float(timing_points[0]['mls_per_beat'])