<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_list(self, key, default=UndefinedKey):
 """Return list representation of value found at key :param key: key to use (dot separated). E.g., a.b.c :type key: basestring :param default: default value if key not found :type default: list :return: list value :type return: list """

        value = self.get(key, default)
        if isinstance(value, list):
            return value
        elif isinstance(value, ConfigTree):
            lst = []
            for k, v in sorted(value.items(), key=lambda kv: kv[0]):
                if re.match('^[1-9][0-9]*$|0', k):
                    lst.append(v)
                else:
                    raise ConfigException(u"{key} does not translate to a list".format(key=key))
            return lst
        elif value is None:
            return None
        else:
            raise ConfigException(
                u"{key} has type '{type}' rather than 'list'".format(key=key, type=type(value).__name__))