code: def init_frag_list(fragment_list, new_frag_list):
      
  
      handle_frag_list = open(fragment_list, "r")
      handle_new_frag_list = open(new_frag_list, "w")
      handle_new_frag_list.write(
          "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n"
          % (
              "id",
              "chrom",
              "start_pos",
              "end_pos",
              "size",
              "gc_content",
              "accu_frag",
              "frag_start",
              "frag_end",
          )
      )
      handle_frag_list.readline()
      i = 0
      while 1:
          line_frag = handle_frag_list.readline()
          if not line_frag:
              handle_frag_list.close()
              handle_new_frag_list.close()
              break
          i += 1
          data = line_frag.split("\t")
          id_init = data[0]
          contig_name = data[1]
          start_pos = data[2]
          end_pos = data[3]
          length_kb = data[4]
          gc_content = str(float(data[5]))
          accu_frag = str(1)
          frag_start = id_init
          frag_end = id_init
          handle_new_frag_list.write(
              "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n"
              % (
                  id_init,
                  contig_name,
                  start_pos,
                  end_pos,
                  length_kb,
                  gc_content,
                  accu_frag,
                  frag_start,
                  frag_end,
              )
          )
  
      return i
docs: Adapt the original fragment list to fit the build function requirements
  
      Parameters
      ----------
      fragment_list : str, file or pathlib.Path
          The input fragment list.
      new_frag_list : str, file or pathlib.Path
          The output fragment list to be written.
      
      Returns
      -------
      i : int
          The number of records processed this way.