class_docstr: The Emails Table implementation
class_docstr_tok: ["The","Emails","Table","implementation"]
code: def parse_date(date_str):
      if isinstance(date_str, dt.datetime):
          return date_str
      date_formats = ["%Y-%m-%d %H:%M:%S", "%Y-%m-%d"]
      date = None
      for date_format in date_formats:
          try:
              date = dt.datetime.strptime(date_str, date_format)
          except ValueError:
              pass
      if date is None:
          raise ValueError(f"Can't parse date: {date_str}")
      date = date.astimezone(pytz.utc)
      return date
  
file_path: mindsdb/mindsdb/integrations/handlers/email_handler/email_tables.py
imports: import datetime
  import ast
  import pytz
  import pandas
  from mindsdb_sql.parser import ast
  from mindsdb.integrations.libs.api_handler import APITable
  from mindsdb.integrations.handlers.utilities.query_utilities import SELECTQueryParser, SELECTQueryExecutor
  from mindsdb.integrations.handlers.utilities.query_utilities.insert_query_utilities import INSERTQueryParser
label_desc: Use image node_id 4 for calling the EmailsTable obj's underlying member method code with example usage: obj.parse_date(date_str) and returns: date, date_str