def join_sub_nodes(main_node, term):
    """
    Outputs a comma separated string of the "term" node values
    :param main_node: xml.etree.ElementTree.Element
    :param term: str
    :return: str
    """
    if main_node is None:
        return ''
    else:
        node_items = main_node.findall(term)
        if node_items is None:
            return ''
        else:
            output_list = []
            for node_item in node_items:
                output_list.append(node_item.text)
        return ','.join(output_list)