<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_current_roles():
 """ Determines the list of roles, that the current host is assigned to. If ``env.roledefs`` is not set, an empty list is returned. :return: List of roles of the current host. :rtype: list """

    current_host = env.host_string
    roledefs = env.get('roledefs')
    if roledefs:
        return [role for role, hosts in six.iteritems(roledefs) if current_host in hosts]
    return []