code: def write_fork_edge(model_dir, to_id, from_id):
      """Write an edge for the search tree graph.
  
      Args:
        model_dir: a string with the model directory.
        to_id: the target trial id (int).
        from_id: the trial we forked from (int).
      """
      if model_dir is None or not model_dir:
          return
  
      if not tf.io.gfile.exists(model_dir):
          tf.io.gfile.makedirs(model_dir)
  
      filename = os.path.join(
          model_dir, "{}.search_edge.txt".format(to_id)
      )
      with tf.io.gfile.GFile(filename, "w") as f:
          f.write("{},{}".format(to_id, from_id))
  
file_path: model_search/model_search/search/common.py
imports: import os
  from model_search import block_builder
  from model_search.architecture import architecture_utils
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling a global function with example usage: write_fork_edge(model_dir, to_id, from_id) without return types