def coalesce_value(value, storage_type, empty_values=None, strip=False):
    if empty_values is None:
        empty_values={}
    if storage_type in ["string", "text"]:
        if strip:
            value = value.strip()
        elif value:
            value = unicode(value)

        if value == "" or value is None:
            value = empty_values.get("string")
    elif storage_type == "integer":
        # FIXME: use configurable thousands separator (now uses space)
        if strip:
            value = re.sub(r"\s", "", value.strip())

        try:
            value = int(value)
        except ValueError:
            value = empty_values.get("integer")
    elif storage_type == "float":
        # FIXME: use configurable thousands separator (now uses space)
        if strip:
            value = re.sub(r"\s", "", value.strip())

        try:
            value = float(value)
        except ValueError:
            value = empty_values.get("float")
    elif storage_type == "list":
        # FIXME: undocumented type
        value = value.split(",")

    return value
Return the dst filepath from the src URI
dataset/ETHPy150Open Stiivi/brewery/brewery/metadata.py/coalesce_value--crossover with--dataset/ETHPy150Open resync/resync/resync/mapper.py/Map.src_to_dst