def METHOD_NAME(self):
    """Create a colormap with a varying alpha channel from segment data."""
    sd = {
        "alpha": [(0.0, 0.5, 0.5), (1.0, 1.0, 1.0)],
        "blue": [(0.0, 0.0, 0.0), (1.0, 1.0, 1.0)],
        "green": [(0.0, 0.0, 0.0), (1.0, 1.0, 1.0)],
        "red": [(0.0, 0.0, 0.0), (1.0, 1.0, 1.0)],
    }
    cm = ColorMapper.from_segment_map(sd)
    assert cm._segmentdata == sd