def _get_write_function(helper, typ):
    """ Return write function

    Args:
        typ (str): LUT type. Values: '1D', '2D' or '3D'

    Returns:
        .write function

    """
    # get write function
    if typ == '3D':
        return helper.write_3d_lut
    elif typ == '1D':
        return helper.write_1d_lut
    elif typ == '2D':
        return helper.write_2d_lut