code: def rdate_to_gdate(rdate):
      r"""Convert RDate format to Gregorian date format.
  
      Parameters
      ----------
      rdate : int
          RDate date format.
  
      Returns
      -------
      gyear : int
          Gregorian year.
      gmonth : int
          Gregorian month.
      gday : int
          Gregorian day.
      """
  
      gyear = rdate_to_gyear(rdate)
      priordays = rdate - gdate_to_rdate(gyear, 1, 1)
      value1 = gdate_to_rdate(gyear, 3, 1)
      if rdate < value1:
          correction = 0
      elif rdate >= value1 and leap_year(gyear):
          correction = 1
      else:
          correction = 2
      gmonth = math.floor((12 * (priordays + correction) + 373) / 367)
      gday = rdate - gdate_to_rdate(gyear, gmonth, 1) + 1
      return gyear, gmonth, gday
  
imports: import calendar
  import logging
  import math
  import pandas
label_desc: Use image node_id 24 for calling a global function with example usage: rdate_to_gdate(rdate) and returns: gyear,  gmonth,  gday