code: def filter_by_chat_date(chats, chat_date):
      return [c for c in chats if c["ds"] <= chat_date]
  
imports: import random
  import io
  import os
  import json
  from parlai.utils.misc import msg_to_str
label_desc: Use image node_id 21 for calling a global function with example usage: filter_by_chat_date(chats, chat_date) and returns: unknown