def visualize_component_internals(filename, component):
    with open(filename, 'r') as f:
        source_text = f.read()
        ir, errors, warnings = calvin_parser(source_text, 'filename')
        if component in ir['components']:
            comp_def = ir['components'][component]
            return CompInternalsViz(comp_def).render()
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/Tools/csviz.py/visualize_component_internals/original