def generate_force_graph(id_files_dict: Dict, id_title_dict: Dict, dirname: str='', highlight: List=None) -> None:
    if (not highlight):
        highlight = []
    nodes = [{'id': title, 'group': (2 if (uid in highlight) else 1)} for (uid, title) in id_title_dict.items()]
    links = []
    for (uid, file) in id_files_dict.items():
        file_links = get_links_from_file(file, dirname=dirname)
        link_list = [{'source': id_title_dict[uid], 'target': id_title_dict[link], 'value': 2} for link in file_links if id_title_dict.get(link, None)]
        links.extend(link_list)
    data = json.dumps({'nodes': nodes, 'links': links})
    with open(FORCE_GRAPH_TEMPLATE_NAME, 'r') as f:
        template = f.read()
        s = Template(template)
        with open(OUTPUT_FILE_NAME, 'w') as out:
            out.write(s.substitute(data=data))
    os.system('open {}'.format(OUTPUT_FILE_NAME))
def generate_force_graph(id_files_dict: Dict, id_title_dict: Dict, dirname: str=, highlight: List=None) -> None:
    if (not highlight):
        highlight = []
    nodes = [{'id': title, 'group': (2 if (uid in highlight) else 1)} for (uid, title) in id_title_dict.items()]
    links = []
    for (uid, file) in id_files_dict.items():
        file_links = get_links_from_file(file, dirname=dirname)
        link_list = [{'source': id_title_dict[uid], 'target': id_title_dict[link], 'value': 2} for link in file_links if id_title_dict.get(link, None)]
        links.extend(link_list)
    data = json.dumps({'nodes': nodes, 'links': links})
    with open(FORCE_GRAPH_TEMPLATE_NAME, 'r') as f:
        template = f.read()
        s = Template(template)
        with open(OUTPUT_FILE_NAME, 'w') as out:
            out.write(s.substitute(data=data))
    os.system('open {}'.format(OUTPUT_FILE_NAME))