<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_definition(self, definition):
 """ Parse the basic structure of both provided and requested entities :param definition: string encoding an entity :return: tuple of entity type, alias and attributes """

        type = definition[0]
        alias = None
        attributes = {}
        for part in definition[1:]:
            if '=' in part:
                key, value = part.split('=', 1)
                attributes[key] = set(value.split(','))
            elif alias is None:
                alias = part
            else:
                raise ValueError('entity name already defined: {}'.format(part))
        return type, alias, attributes