code: def day_of_week(rdate):
      r"""Get the ordinal day of the week.
  
      Parameters
      ----------
      rdate : int
          RDate date format.
  
      Returns
      -------
      dw : int
          Ordinal day of the week.
      """
      dw = rdate % 7
      return dw
  
imports: import calendar
  import logging
  import math
  import pandas
label_desc: Use image node_id 4 for calling a global function with example usage: day_of_week(rdate) and returns: dw