code: def previous_friday(dt: datetime) -> datetime:
      """
      If holiday falls on Saturday or Sunday, use previous Friday instead.
      """
      if dt.weekday() == 5:
          return dt - timedelta(1)
      elif dt.weekday() == 6:
          return dt - timedelta(2)
      return dt
  
imports: from __future__ import annotations
  from datetime import datetime, timedelta
  import warnings
  from dateutil.relativedelta import FR, MO, SA, SU, TH, TU, WE
  import numpy
  from pandas.errors import PerformanceWarning
  from pandas import DateOffset, DatetimeIndex, Series, Timestamp, concat, date_range
  from pandas.tseries.offsets import Day, Easter
label_desc: Use image node_id 3 for calling a global function with example usage: previous_friday(dt) and returns: dt, unknown, unknown