code: def notify_token_expiration(
      obj,
      days,
      sender_name,
      sender_email,
      recipient_email,
      smtp_user,
      smtp_password,
      smtp_server,
      smtp_port,
      send,
  ):
      """
      Check if token is close to expiration and send email notifying.
      """
      output = obj["output"]
      queue = obj["queue"]
  
      token_expiration_date = queue.token_expiration_date()
      days_left = 0
      if token_expiration_date:
          days_left = (token_expiration_date - date.today()).days
          if days_left > days:
              output.write(
                  "Notification not sent. "
                  + f"Token will expire in {days_left} days."
              )
              return
  
      class TokenExpirationReport:
          def __init__(self, token_expiration_date, days_left):
              self.token_expiration_date = token_expiration_date
              self.days_left = days_left
  
      email_report = EmailReport(
          report=TokenExpirationReport(
              token_expiration_date or "ALREADY_EXPIRED", days_left
          ),
          sender_name=sender_name,
          sender_email=sender_email,
          recipient_email=recipient_email,
      )
  
      message = email_report.render("token_expiration").strip()
      if send:
          ReportUtils.send_email(
              smtp_user=smtp_user,
              smtp_password=smtp_password,
              smtp_server=smtp_server,
              smtp_port=smtp_port,
              recipient_email=recipient_email,
              message=message,
          )
      else:
          output.write(message)
  
imports: from datetime import date
  from pathlib import Path
  import time
  import sys
  import click
  from .core import Config, Repo, Queue, Target, Job, CrossbowError
  from .reports import ChatReport, Report, ReportUtils, ConsoleReport, EmailReport, CommentReport
  from ..utils.source import ArrowSources
label_desc: Use image node_id 15 for calling a global function with example usage: notify_token_expiration(obj, days, sender_name, sender_email, recipient_email, smtp_user, smtp_password, smtp_server, smtp_port, send) without return types