def expand_value(value, params):
    """Expand str / list value with parameters by using str.format()
    """
    if not value:
        return value
    if isinstance(value, list):
        value = list(map(
            lambda s: s.format(**params),
            value
        ))
    else:
        value = value.format(**params)
    return value