code: def subtract_dates(gyear1, gmonth1, gday1, gyear2, gmonth2, gday2):
      r"""Calculate the difference between two Gregorian dates.
  
      Parameters
      ----------
      gyear1 : int
          Gregorian year of first date.
      gmonth1 : int
          Gregorian month of first date.
      gday1 : int
          Gregorian day of first date.
      gyear2 : int
          Gregorian year of successive date.
      gmonth2 : int
          Gregorian month of successive date.
      gday2 : int
          Gregorian day of successive date.
  
      Returns
      -------
      delta_days : int
          Difference in days in RDate format.
      """
      delta_days = gdate_to_rdate(
          gyear2, gmonth2, gday2
      ) - gdate_to_rdate(gyear1, gmonth1, gday1)
      return delta_days
  
imports: import calendar
  import logging
  import math
  import pandas
label_desc: Use image node_id 27 for calling a global function with example usage: subtract_dates(gyear1, gmonth1, gday1, gyear2, gmonth2, gday2) and returns: delta_days