human
I wrote the below code

    def _coerce(current, value):
        try:
            return current(value)
        except TypeError:
            if (isinstance(current, list) and isinstance(value, str)):
                return value.split(list_sep)
            try:
                return type(current)(value)
            except TypeError:
                return value
    def _update_type(value, path):
        current = reference
        for elem in path:
            try:
                current = current[elem]
            except KeyError:
                return value
        return _coerce(current, value)
    return map_leafs(_update_type, config)

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def update_types(config, reference, list_sep=':'):