code: def before_nearest_workday(dt):
      """
      returns previous workday after nearest workday
      """
      return previous_workday(nearest_workday(dt))
  
imports: from datetime import datetime, timedelta
  import warnings
  from dateutil.relativedelta import FR, MO, SA, SU, TH, TU, WE
  import numpy
  from pandas.compat import add_metaclass
  from pandas.errors import PerformanceWarning
  from pandas import DateOffset, Series, Timestamp, date_range
  from pandas.tseries.offsets import Day, Easter
label_desc: Use image node_id 9 for calling a global function with example usage: before_nearest_workday(dt) and returns: previous_workday