code: def write_root(histogram: HistogramBase, hfile: uproot.write.TFile.TFileUpdate, name: str):
      
      hfile[name] = histogram
docs: Write histogram to an open ROOT file.
  
      Parameters
      ----------
      histogram : Any histogram
      hfile : Updateable uproot file object
      name : The name of the histogram inside the file