def _get_topic_base(device_id, module_id):
    """
    return the string that is at the beginning of all topics for this
    device/module
    """

    if module_id:
        return "devices/" + device_id + "/modules/" + module_id
    else:
        return "devices/" + device_id