Searches a string for an occurence of a substring and returns the UTF-8 code point index (zero-based) of the first occurence.
    If the substring is not found, returns -1.
    https://docs.mongodb.com/manual/reference/operator/aggregation/indexOfCP/
    for more details
    :param string_expression: The string or expression of string
    :param substring_expression: The string or expression of substring
    :param start: A number that can be represented as integers (or expression), that specifies the starting index position for the search.
    :param end: A number that can be represented as integers (or expression), that specifies the ending index position for the search.
    :return: Aggregation operator

def INDEX_OF_CP(string_expression, substring_expression, start=None, end=None):
    """
    Searches a string for an occurence of a substring and returns the UTF-8 code point index (zero-based) of the first occurence.
    If the substring is not found, returns -1.
    https://docs.mongodb.com/manual/reference/operator/aggregation/indexOfCP/
    for more details
    :param string_expression: The string or expression of string
    :param substring_expression: The string or expression of substring
    :param start: A number that can be represented as integers (or expression), that specifies the starting index position for the search.
    :param end: A number that can be represented as integers (or expression), that specifies the ending index position for the search.
    :return: Aggregation operator
    """
    res = [string_expression, substring_expression]
    if start is not None:
        res.append(start)
    if end is not None:
        res.append(end)
    return {'$indexOfCP': res}