def INDEX_OF_BYTES(string_expression, substring_expression, start=None, end=None):
    """
    Searches a string for an occurence of a substring and returns the UTF-8 byte index (zero-based) of the first occurence.
    If the substring is not found, returns -1.
    https://docs.mongodb.com/manual/reference/operator/aggregation/indexOfBytes/
    for more details
    :param string_expression: The string or expression of string
    :param substring_expression: The string or expression of substring
    :param start: An integral number (or expression) that specifies the starting index position for the search.
    :param end: An integral number (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 {'$indexOfBytes': res}
Searches a string for an occurence of a substring and returns the UTF-8 byte index (zero-based) of the first occurence.
    If the substring is not found, returns -1.
    https://docs.mongodb.com/manual/reference/operator/aggregation/indexOfBytes/
    for more details
    :param string_expression: The string or expression of string
    :param substring_expression: The string or expression of substring
    :param start: An integral number (or expression) that specifies the starting index position for the search.
    :param end: An integral number (or expression) that specifies the ending index position for the search.
    :return: Aggregation operator