<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def normalized_scalar_param_list(param, length, param_conv=None, keep_none=True, return_nonconv=False):
 """Return a list of given length from a scalar parameter. The typical use case is when a single value or a sequence of values is accepted as input. This function makes a list from a given sequence or a list of identical elements from a single value, with cast to a given parameter type if desired. To distinguish a parameter sequence from a single parameter, the following rules are applied: * If ``param`` is not a sequence, it is treated as a single parameter (e.g. ``1``). * If ``len(param) == length == 1``, then ``param`` is interpreted as a single parameter (e.g. ``[1]`` or ``'1'``). * If ``len(param) == length != 1``, then ``param`` is interpreted as sequence of parameters. * Otherwise, ``param`` is interpreted as a single parameter. Note that this function is not applicable to parameters which are themselves iterable (e.g. ``'abc'`` with ``length=3`` will be interpreted as equivalent to ``['a', 'b', 'c']``). Parameters param : Input parameter to turn into a list. length : nonnegative int Desired length of the output list. param_conv : callable, optional Conversion applied to each list element. ``None`` means no conversion. keep_none : bool, optional If ``True``, ``None`` is not converted. return_nonconv : bool, optional If ``True``, return also the list where no conversion has been applied. Returns ------- plist : list Input parameter turned into a list of length ``length``. nonconv : list The same as ``plist``, but without conversion. This is only returned if ``return_nonconv == True``. Examples -------- Turn input into a list of given length, possibly by broadcasting. By default, no conversion is performed. [1, 2, 3] [1, None, 3.0] Single parameters are broadcast to the given length. [1, 1, 1] ['10', '10', '10'] [None, None, None] List entries can be explicitly converted using ``param_conv``. If ``None`` should be kept, set ``keep_none`` to ``True``: [1.0, 1.0, 1.0] [10, 10, 10] [1, None, 3] The conversion parameter can be any callable: [False, False, True] """

    length, length_in = int(length), length
    if length < 0:
        raise ValueError('`length` must be nonnegative, got {}'
                         ''.format(length_in))

    param = np.array(param, dtype=object, copy=True, ndmin=1)
    nonconv_list = list(np.broadcast_to(param, (length,)))

    if len(nonconv_list) != length:
        raise ValueError('sequence `param` has length {}, expected {}'
                         ''.format(len(nonconv_list), length))

    if param_conv is None:
        out_list = list(nonconv_list)
    else:
        out_list = []
        for p in nonconv_list:
            if p is None and keep_none:
                out_list.append(p)
            else:
                out_list.append(param_conv(p))

    if return_nonconv:
        return out_list, nonconv_list
    else:
        return out_list