def format_labels(labels_dict):
    """
    Format labels dictionary as 'key:value,key2:value'
    """

    if labels_dict is None:
        return ""

    labels = []
    for k, v in labels_dict.items():
        labels.append("%s:%s" % (k, str(v)))
    return ", ".join(labels)