def METHOD_NAME(
    similarities: Iterable[Dict[str, Union[str, float]]]
) -> List[str]:
    """Sorts similarities of explorations and slices them to
    a maximum length.
    Args:
        similarities:iterable(). Iterable of dictionaries. The structure of
            the dictionaries is:
                exp_id: str. The ID of the similar exploration.
                similarity_score: float. The similarity score for
                    the exploration.
    Returns:
        list(str). List of exploration IDs, sorted by the similarity.
    """
    sorted_similarities = sorted(
        similarities, reverse=True, key=lambda x: x['similarity_score'])
    return [
            str(item['exp_id']) for item in sorted_similarities
        ][:MAX_RECOMMENDATIONS]