def get_weight_of(level: int) -> int:
    """Return the weight of a given `level`. The ratio is 1:3:5 for
    modules of L4:L5:L6 respectively."""
    levels = {4: 1, 5: 3, 6: 5}
    return levels[level] if isinstance(level, int) and level in levels else 0