from typing import Dict
from typing import Any


def time_crop_or_pad_intensity_helper(metadata: Dict[str, Any]) -> float:
    """
    Computes intensity of a transform that consists of temporal cropping or
    padding. For these types of transforms the intensity is defined as the
    percentage of video time that has been cut out (for cropping) or added
    (for padding). When computing the percentage, the denominator should be
    the longer of the src & dst durations so the resulting percentage isn't
    greater than 100.
    """
    dst_duration = metadata["dst_duration"]
    src_duration = metadata["src_duration"]
    larger_duration = max(src_duration, dst_duration)
    return (abs(dst_duration - src_duration) / larger_duration) * 100.0