parameters: (dt: datetime)
return_statement: return dt
docstring: If holiday falls on Saturday, use day before (Friday) instead;
      if holiday falls on Sunday, use day thereafter (Monday) instead.
docstring_summary: If holiday falls on Saturday, use day before (Friday) instead;
      if holiday falls on Sunday, use day thereafter (Monday) instead.
docstring_tokens: If holiday falls on Saturday use day before ( Friday ) instead ; if holiday falls on Sunday use day thereafter ( Monday ) instead .
function: def nearest_workday(dt: datetime) -> datetime:
      """
      If holiday falls on Saturday, use day before (Friday) instead;
      if holiday falls on Sunday, use day thereafter (Monday) instead.
      """
      if dt.weekday() == 5:
          return dt - timedelta(1)
      elif dt.weekday() == 6:
          return dt + timedelta(1)
      return dt
function_tokens: def nearest_workday ( dt : datetime ) -> datetime : if dt . weekday ( ) == 5 : return dt - timedelta ( 1 ) elif dt . weekday ( ) == 6 : return dt + timedelta ( 1 ) return dt