def map_resource_instance_type(data_type: str, default_instance_definition: str) -> str:
    """
    in the C++ Client, instances can be SINGLE instanced, MULTIPLE Instanced or PTR.
        SINGLE or MULTIPLE are both LwM2M standards and thus can be extracted from a standard
        xml Document and passed to as the `default_instance_definition`.
        The PTR Instance Type is only available inside our custom C++ lwm2m client,
        it helps optimize read-only strings and pointers to executables. it's determined by the `data_type` argument.
    :param data_type: the data type string returned by the function `map_to_cpp_data_type()`
    :param default_instance_definition: the default string value of the MultipleInstances tag from a standard xml doc
    :return: the C++ defined instance type string
    :rtype: str
    """

    # for executables and pointer (i.e char*) data types, use the C++ defined PTR Instance Type.
    if data_type == "executable" or "*" in data_type:
        return "PTR"

    return default_instance_definition