code: def halloween(gyear):
      r"""Get Halloween for a given year.
  
      Parameters
      ----------
      gyear : int
          Gregorian year.
  
      Returns
      -------
      halloween : int
          Halloween in RDate format.
      """
      halloween = gdate_to_rdate(gyear, 10, 31)
      return halloween
  
imports: import calendar
  import logging
  import math
  import pandas
label_desc: Use image node_id 41 for calling a global function with example usage: halloween(gyear) and returns: halloween