from server.constants.core import ApolloEntityType def get_entity_id(_type: ApolloEntityType, **kwargs) -> str: if _type == ApolloEntityType.PLAYLIST: return f"{kwargs['vendor']}_{kwargs.get('country_code')}_{kwargs['id']}" raise NotImplemented(f"Unsupported entity type={_type}.")