<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_name(clz, name):
 """ Instantiates the object from a known name """

        if isinstance(name, list) and "green" in name:
            name = "teal"
        assert name in COLOR_NAMES, 'Unknown color name'
        r, b, g = COLOR_NAMES[name]
        return clz(r, b, g)