<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_json_file(graph: BELGraph, file: TextIO, **kwargs) -> None: """Write this graph as Node-Link JSON to a file."""

    graph_json_dict = to_json(graph)
    json.dump(graph_json_dict, file, ensure_ascii=False, **kwargs)