import json


def model_comment(comment_type, text, other=None):
    """
    Print a model comment. This is a base function for some functions implemented below but sometimes it is necessary to
    use it directly.

    :param comment_type: Comment type string.
    :param text: Comment text.
    :param other: Additional existing dictionary with some data.
    :return: String with the model comment.
    """
    if other and isinstance(other, dict):
        comment = other
    else:
        comment = dict()

    comment['type'] = comment_type.upper()
    if text:
        comment['comment'] = text

    string = json.dumps(comment)
    return "/* LDV {} */".format(string)