def METHOD_NAME(canvas, min_ratio, max_ratio, h1, h2):
  canvas.ResetAttPad()
  canvas.Clear()
  pad = TPad("main","main", 0, 0.3, 1, 1)
  pad.SetBottomMargin(0.05);
  pad.Draw()
  pad.cd()
  h1.Draw()
  h2.SetLineColor(kOrange+10)
  h2.Draw('SAME')
  canvas.cd()
  ratio = TPad("ratio","ratio", 0, 0.05, 1, 0.3);
  ratio.SetTopMargin(0.05);
  ratio.Draw()
  ratio.cd()
  if isinstance(h1, TProfile) and isinstance(h2, TProfile):
    h1_p = h1.ProjectionX()
    h2_p = h2.ProjectionX()
    h1_p.Divide(h2_p)
    h1_p.SetMaximum(max_ratio)
    h1_p.SetMinimum(min_ratio)
    h1_p.SetMarkerStyle(kFullCircle)
    h1_p.SetMarkerSize(0.6)
    h1_p.SetTitle('')
    h1_p.GetXaxis().SetLabelFont(42)
    h1_p.GetXaxis().SetLabelSize(0.1)
    h1_p.GetYaxis().SetLabelFont(42)
    h1_p.GetYaxis().SetLabelSize(0.1)
    h1_p.GetYaxis().SetNdivisions(505)
    equality = TLine()
    h1_p.Draw("SAME HIST P")
    equality.SetLineColor(kOrange+10)
    equality.DrawLine(h1_p.GetXaxis().GetXmin(), 1, h1_p.GetXaxis().GetXmax(), 1)