def extract_entities(template):
 if ((template is None) or _RE_NONE_ENTITIES.search(template)):
  return MATCH_ALL
 extraction = _RE_GET_ENTITIES.findall(template)
 if (len(extraction) > 0):
  return list(set(extraction))
 return MATCH_ALL

def extract_entities ( template ) : if ( ( template is None ) or _RE_NONE_ENTITIES . search ( template ) ) : return MATCH_ALL extraction = _RE_GET_ENTITIES . findall ( template ) if ( len ( extraction ) > 0 ) : return list ( set ( extraction ) ) return MATCH_ALL
extract all entities for state_changed listener from template string .